# about.gd
# This file is part of: SimpleGrassTextured
# Copyright (c) 2023 IcterusGames
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the 
# "Software"), to deal in the Software without restriction, including 
# without limitation the rights to use, copy, modify, merge, publish, 
# distribute, sublicense, and/or sell copies of the Software, and to 
# permit persons to whom the Software is furnished to do so, subject to 
# the following conditions: 
#
# The above copyright notice and this permission notice shall be 
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

@tool
extends AcceptDialog

@export_multiline var message := ""

var icon_itch := "PHN2ZyBoZWlnaHQ9IjMyMy45NiIgd2lkdGg9IjMyMy45NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCBmaWxsPSIjZmE1YzVjIiBoZWlnaHQ9IjMxMy45NiIgcnk9IjguNjE0MSIgc3Ryb2tlPSIjZDU0YzRjIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMTAiIHdpZHRoPSIzMTMuOTYiIHg9IjUiIHk9IjUiLz48ZyBmaWxsPSIjZmZmIiB0cmFuc2Zvcm09Im1hdHJpeCguOTM3MjEgMCAwIC45MzcyMSA1OC43NTEgMzUuMzM2KSI+PHBhdGggZD0ibS40MzUgMTk3LjI1aDI0LjE0MnY3MS41NTRo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zLjQwNS0yNC45MzUgMzMuNDA1LTQ2LjY5MUM5Ny43MDcgMjIgNzUuNzg4IDAgNDguODU0IDB6IiBmaWxsPSIjZmZmIi8+PC9zdmc+"


func _ready() -> void:
	var config := ConfigFile.new()
	config.load("res://addons/simplegrasstextured/plugin.cfg")
	%RichTextLabel.text = message.format({"_version_num":config.get_value("plugin", "version")})
	name = &"SimpleGrassTexturedHelpAbout"
	get_ok_button().custom_minimum_size.x = 100
	size.y = 250
	await %ItchContainer.draw
	var gui_h: int = max(32, %ItchContainer.size.y)
	var base_color: Color = EditorInterface.get_base_control().get_theme_color(&"base_color", &"Editor")
	if base_color.get_luminance() < 0.5:
		_set_icon_button(%ItchContainer, icon_itch, gui_h, 324)
		_set_icon_button(%PatreonContainer, icon_patreon_light, gui_h, 360)
		_set_icon_button(%GithubContainer, icon_github_light, gui_h, 96)
	else:
		_set_icon_button(%ItchContainer, icon_itch, gui_h, 324)
		_set_icon_button(%PatreonContainer, icon_patreon_dark, gui_h, 360)
		_set_icon_button(%GithubContainer, icon_github_dark, gui_h, 96)


func _set_icon_button(container: Container, icon: String, gui_h: int, icon_size: int):
	var image := Image.new()
	var t_rect: TextureRect
	image.load_svg_from_string(Marshalls.base64_to_utf8(icon), gui_h / float(icon_size))
	t_rect = TextureRect.new()
	t_rect.expand_mode = TextureRect.EXPAND_IGNORE_SIZE
	t_rect.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
	t_rect.texture = ImageTexture.create_from_image(image)
	t_rect.custom_minimum_size.x = gui_h
	container.add_child(t_rect)
	container.move_child(t_rect, 0)


func _on_canceled() -> void:
	queue_free()


func _on_confirmed() -> void:
	queue_free()


func _on_itch_button_pressed() -> void:
	OS.shell_open("https://icterusgames.itch.io")


func _on_patreon_button_pressed() -> void:
	OS.shell_open("https://www.patreon.com/IcterusGames")


func _on_github_button_pressed() -> void:
	OS.shell_open("https://github.com/IcterusGames/SimpleGrassTextured")
