2019-12-31 16:04:00 +00:00
|
|
|
extends WindowDialog
|
|
|
|
|
2020-05-01 17:47:10 +00:00
|
|
|
|
2019-12-31 17:04:54 +00:00
|
|
|
func _on_SplashDialog_about_to_show() -> void:
|
2020-08-21 17:13:22 +00:00
|
|
|
var art_by_label : Button = Global.find_node_by_name(self, "ArtistName")
|
2020-05-15 13:20:23 +00:00
|
|
|
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 11:48:13 +00: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 13:20:23 +00:00
|
|
|
|
2020-01-05 22:15:16 +00:00
|
|
|
if Global.config_cache.has_section_key("preferences", "startup"):
|
|
|
|
show_on_startup_button.pressed = !Global.config_cache.get_value("preferences", "startup")
|
2020-05-03 21:04:00 +00:00
|
|
|
window_title = "Pixelorama" + " " + Global.current_version
|
2019-12-31 17:04:54 +00:00
|
|
|
|
2020-08-21 17:13:22 +00:00
|
|
|
art_by_label.text = tr("Art by: %s") % "Wishdream"
|
2020-05-16 11:48:13 +00: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 14:03:04 +00:00
|
|
|
if "zh" in TranslationServer.get_locale():
|
2020-05-05 00:53:58 +00: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 14:03:04 +00:00
|
|
|
else:
|
2020-05-05 00:53:58 +00: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 13:20:23 +00: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 15:36:46 +00:00
|
|
|
if OS.get_name() == "HTML5":
|
|
|
|
$Contents/ButtonsPatronsLogos/Buttons/OpenLastBtn.visible = false
|
|
|
|
|
2019-12-31 18:10:10 +00:00
|
|
|
|
2020-05-01 17:47:10 +00:00
|
|
|
|
2019-12-31 16:04:00 +00:00
|
|
|
func _on_ArtCredits_pressed() -> void:
|
2020-05-15 13:20:23 +00:00
|
|
|
OS.shell_open("https://twitter.com/WishdreamStar")
|
2020-01-01 15:33:32 +00:00
|
|
|
|
2020-05-01 17:47:10 +00:00
|
|
|
|
2020-01-01 18:04:13 +00:00
|
|
|
func _on_ShowOnStartup_toggled(pressed : bool) -> void:
|
2020-01-01 15:33:32 +00:00
|
|
|
if pressed:
|
|
|
|
Global.config_cache.set_value("preferences", "startup", false)
|
|
|
|
else:
|
2020-01-05 14:03:04 +00:00
|
|
|
Global.config_cache.set_value("preferences", "startup", true)
|
2020-05-02 15:10:01 +00:00
|
|
|
Global.config_cache.save("user://cache.ini")
|
2020-01-05 14:03:04 +00:00
|
|
|
|
2020-05-01 17:47:10 +00:00
|
|
|
|
2020-05-01 22:47:48 +00:00
|
|
|
func _on_PatreonButton_pressed() -> void:
|
2020-01-05 14:03:04 +00:00
|
|
|
OS.shell_open("https://www.patreon.com/OramaInteractive")
|
|
|
|
|
2020-05-01 17:47:10 +00:00
|
|
|
|
2020-01-05 14:03:04 +00:00
|
|
|
func _on_TakeThisSpot_pressed() -> void:
|
|
|
|
OS.shell_open("https://www.patreon.com/OramaInteractive")
|
2020-04-30 11:44:24 +00:00
|
|
|
|
2020-05-01 17:47:10 +00:00
|
|
|
|
|
|
|
func _on_GithubButton_pressed() -> void:
|
2020-04-30 11:44:24 +00:00
|
|
|
OS.shell_open("https://github.com/Orama-Interactive/Pixelorama")
|
|
|
|
|
2020-05-01 17:47:10 +00:00
|
|
|
|
|
|
|
func _on_DiscordButton_pressed() -> void:
|
2020-04-30 11:44:24 +00:00
|
|
|
OS.shell_open("https://discord.gg/GTMtr8s")
|
|
|
|
|
|
|
|
|
2020-05-01 17:47:10 +00:00
|
|
|
func _on_NewBtn_pressed() -> void:
|
2020-04-30 11:44:24 +00:00
|
|
|
visible = false
|
2020-06-23 14:15:18 +00:00
|
|
|
Global.top_menu_container.file_menu_id_pressed(0)
|
2020-04-30 11:44:24 +00:00
|
|
|
|
2020-05-01 17:47:10 +00:00
|
|
|
|
|
|
|
func _on_OpenBtn__pressed() -> void:
|
2020-04-30 11:44:24 +00:00
|
|
|
visible = false
|
2020-06-23 14:15:18 +00:00
|
|
|
Global.top_menu_container.file_menu_id_pressed(1)
|
2020-04-30 11:44:24 +00:00
|
|
|
|
2020-05-01 17:47:10 +00:00
|
|
|
|
|
|
|
func _on_OpenLastBtn_pressed() -> void:
|
2020-04-30 11:44:24 +00:00
|
|
|
visible = false
|
2020-06-23 14:15:18 +00:00
|
|
|
Global.top_menu_container.file_menu_id_pressed(2)
|