2019-12-31 18:04:00 +02:00
|
|
|
extends WindowDialog
|
|
|
|
|
2020-05-01 20:47:10 +03:00
|
|
|
|
2019-12-31 19:04:54 +02:00
|
|
|
func _on_SplashDialog_about_to_show() -> void:
|
2020-05-15 16:20:23 +03:00
|
|
|
var art_by_label : Label = Global.find_node_by_name(self, "ArtByLabel")
|
|
|
|
var show_on_startup_button : CheckBox = Global.find_node_by_name(self, "ShowOnStartup")
|
|
|
|
var developed_by_label : Label = Global.find_node_by_name(self, "DevelopedBy")
|
2020-05-16 14:48:13 +03:00
|
|
|
var become_platinum : Button = Global.find_node_by_name(self, "BecomePlatinum")
|
|
|
|
var become_gold : Button = Global.find_node_by_name(self, "BecomeGold")
|
|
|
|
var become_patron : Button = Global.find_node_by_name(self, "BecomePatron")
|
2020-05-15 16:20:23 +03:00
|
|
|
|
2020-01-06 00:15:16 +02:00
|
|
|
if Global.config_cache.has_section_key("preferences", "startup"):
|
|
|
|
show_on_startup_button.pressed = !Global.config_cache.get_value("preferences", "startup")
|
2020-05-04 00:04:00 +03:00
|
|
|
window_title = "Pixelorama" + " " + Global.current_version
|
2019-12-31 19:04:54 +02:00
|
|
|
|
2020-05-15 16:20:23 +03:00
|
|
|
art_by_label.text = tr("Art by") + ":"
|
2020-05-16 14:48:13 +03:00
|
|
|
become_platinum.text = "- " + tr("Become a Platinum Sponsor")
|
|
|
|
become_gold.text = "- " + tr("Become a Gold Sponsor")
|
|
|
|
become_patron.text = "- " + tr("Become a Patron")
|
2020-01-05 16:03:04 +02:00
|
|
|
if "zh" in TranslationServer.get_locale():
|
2020-05-05 03:53:58 +03:00
|
|
|
show_on_startup_button.add_font_override("font", preload("res://assets/fonts/CJK/NotoSansCJKtc-Small.tres"))
|
|
|
|
developed_by_label.add_font_override("font", preload("res://assets/fonts/CJK/NotoSansCJKtc-Small.tres"))
|
2020-01-05 16:03:04 +02:00
|
|
|
else:
|
2020-05-05 03:53:58 +03:00
|
|
|
show_on_startup_button.add_font_override("font", preload("res://assets/fonts/Roboto-Small.tres"))
|
|
|
|
developed_by_label.add_font_override("font", preload("res://assets/fonts/Roboto-Small.tres"))
|
2020-05-15 16:20:23 +03:00
|
|
|
|
|
|
|
get_stylebox("panel", "WindowDialog").bg_color = Global.control.theme.get_stylebox("panel", "WindowDialog").bg_color
|
|
|
|
get_stylebox("panel", "WindowDialog").border_color = Global.control.theme.get_stylebox("panel", "WindowDialog").border_color
|
2020-07-15 18:36:46 +03:00
|
|
|
if OS.get_name() == "HTML5":
|
|
|
|
$Contents/ButtonsPatronsLogos/Buttons/OpenLastBtn.visible = false
|
|
|
|
|
2019-12-31 20:10:10 +02:00
|
|
|
|
2020-05-01 20:47:10 +03:00
|
|
|
|
2019-12-31 18:04:00 +02:00
|
|
|
func _on_ArtCredits_pressed() -> void:
|
2020-05-15 16:20:23 +03:00
|
|
|
OS.shell_open("https://twitter.com/WishdreamStar")
|
2020-01-01 16:33:32 +01:00
|
|
|
|
2020-05-01 20:47:10 +03:00
|
|
|
|
2020-01-01 20:04:13 +02:00
|
|
|
func _on_ShowOnStartup_toggled(pressed : bool) -> void:
|
2020-01-01 16:33:32 +01:00
|
|
|
if pressed:
|
|
|
|
Global.config_cache.set_value("preferences", "startup", false)
|
|
|
|
else:
|
2020-01-05 16:03:04 +02:00
|
|
|
Global.config_cache.set_value("preferences", "startup", true)
|
2020-05-02 18:10:01 +03:00
|
|
|
Global.config_cache.save("user://cache.ini")
|
2020-01-05 16:03:04 +02:00
|
|
|
|
2020-05-01 20:47:10 +03:00
|
|
|
|
2020-05-02 01:47:48 +03:00
|
|
|
func _on_PatreonButton_pressed() -> void:
|
2020-01-05 16:03:04 +02:00
|
|
|
OS.shell_open("https://www.patreon.com/OramaInteractive")
|
|
|
|
|
2020-05-01 20:47:10 +03:00
|
|
|
|
2020-01-05 16:03:04 +02:00
|
|
|
func _on_TakeThisSpot_pressed() -> void:
|
|
|
|
OS.shell_open("https://www.patreon.com/OramaInteractive")
|
2020-04-30 17:14:24 +05:30
|
|
|
|
2020-05-01 20:47:10 +03:00
|
|
|
|
|
|
|
func _on_GithubButton_pressed() -> void:
|
2020-04-30 17:14:24 +05:30
|
|
|
OS.shell_open("https://github.com/Orama-Interactive/Pixelorama")
|
|
|
|
|
2020-05-01 20:47:10 +03:00
|
|
|
|
|
|
|
func _on_DiscordButton_pressed() -> void:
|
2020-04-30 17:14:24 +05:30
|
|
|
OS.shell_open("https://discord.gg/GTMtr8s")
|
|
|
|
|
|
|
|
|
2020-05-01 20:47:10 +03:00
|
|
|
func _on_NewBtn_pressed() -> void:
|
2020-04-30 17:14:24 +05:30
|
|
|
visible = false
|
2020-06-23 17:15:18 +03:00
|
|
|
Global.top_menu_container.file_menu_id_pressed(0)
|
2020-04-30 17:14:24 +05:30
|
|
|
|
2020-05-01 20:47:10 +03:00
|
|
|
|
|
|
|
func _on_OpenBtn__pressed() -> void:
|
2020-04-30 17:14:24 +05:30
|
|
|
visible = false
|
2020-06-23 17:15:18 +03:00
|
|
|
Global.top_menu_container.file_menu_id_pressed(1)
|
2020-04-30 17:14:24 +05:30
|
|
|
|
2020-05-01 20:47:10 +03:00
|
|
|
|
|
|
|
func _on_OpenLastBtn_pressed() -> void:
|
2020-04-30 17:14:24 +05:30
|
|
|
visible = false
|
2020-06-23 17:15:18 +03:00
|
|
|
Global.top_menu_container.file_menu_id_pressed(2)
|