diff --git a/Prefabs/Dialogs/SplashDialog.tscn b/Prefabs/Dialogs/SplashDialog.tscn index 7a688db38..ab3244d91 100644 --- a/Prefabs/Dialogs/SplashDialog.tscn +++ b/Prefabs/Dialogs/SplashDialog.tscn @@ -6,7 +6,6 @@ [ext_resource path="res://Assets/Fonts/Roboto-Small.tres" type="DynamicFont" id=4] [node name="SplashDialog" type="WindowDialog"] -visible = true margin_right = 400.0 margin_bottom = 380.0 rect_min_size = Vector2( 400, 380 ) @@ -42,6 +41,7 @@ expand = true margin_top = 306.0 margin_right = 400.0 margin_bottom = 326.0 +mouse_default_cursor_shape = 2 text = "Art by Erevoid" flat = true @@ -65,4 +65,5 @@ margin_bottom = 368.0 custom_fonts/font = ExtResource( 4 ) text = "Copyright 2019-2020 Orama Interactive" align = 1 +[connection signal="about_to_show" from="." to="." method="_on_SplashDialog_about_to_show"] [connection signal="pressed" from="Contents/ArtCredits" to="." method="_on_ArtCredits_pressed"] diff --git a/Scripts/Dialogs/AboutDialog.gd b/Scripts/Dialogs/AboutDialog.gd index 3e453b9e5..beea0e790 100644 --- a/Scripts/Dialogs/AboutDialog.gd +++ b/Scripts/Dialogs/AboutDialog.gd @@ -15,14 +15,18 @@ func _ready() -> void: var developers_button := groups.create_item(groups_root) var contributors_button := groups.create_item(groups_root) var donors_button := groups.create_item(groups_root) - developers_button.set_text(0, " Developers") + developers_button.set_text(0, " " + tr("Developers")) + # We use metadata to avoid being affected by translations + developers_button.set_metadata(0, "Developers") developers_button.select(0) - contributors_button.set_text(0, " Contributors") - donors_button.set_text(0, " Donors") + contributors_button.set_text(0, " " + tr("Contributors")) + contributors_button.set_metadata(0, "Contributors") + donors_button.set_text(0, " " + tr("Donors")) + donors_button.set_metadata(0, "Donors") var dev_root := developers.create_item() - developers.create_item(dev_root).set_text(0, " Manolis Papadeas (Overloaded) - Lead Programmer") - developers.create_item(dev_root).set_text(0, " John Nikitakis (Erevos) - UI Designer") + developers.create_item(dev_root).set_text(0, " Manolis Papadeas (Overloaded) - " + tr("Lead Programmer")) + developers.create_item(dev_root).set_text(0, " John Nikitakis (Erevos) - " + tr("UI Designer")) var contributor_root := contributors.create_item() contributors.create_item(contributor_root).set_text(0, " Hugo Locurcio") @@ -49,7 +53,7 @@ func _on_Groups_item_selected() -> void: if child != groups: child.visible = false - var selected := groups.get_selected().get_text(0) + var selected : String = groups.get_selected().get_metadata(0) if "Developers" in selected: developer_container.visible = true elif "Contributors" in selected: diff --git a/Scripts/Dialogs/PreferencesDialog.gd b/Scripts/Dialogs/PreferencesDialog.gd index 2598eadde..719c8e3c9 100644 --- a/Scripts/Dialogs/PreferencesDialog.gd +++ b/Scripts/Dialogs/PreferencesDialog.gd @@ -11,10 +11,13 @@ func _ready() -> void: var language_button := tree.create_item(root) var theme_button := tree.create_item(root) var grid_button := tree.create_item(root) - language_button.set_text(0, " Language") + language_button.set_text(0, " " + tr("Language")) + language_button.set_metadata(0, "Language") language_button.select(0) - theme_button.set_text(0, " Themes") - grid_button.set_text(0, " Guides & Grid") + theme_button.set_text(0, " " + tr("Themes")) + theme_button.set_metadata(0, "Themes") + grid_button.set_text(0, " " + tr("Guides & Grid")) + grid_button.set_metadata(0, "Guides & Grid") for child in languages.get_children(): if child is Button: @@ -32,7 +35,7 @@ func _ready() -> void: func _on_Tree_item_selected() -> void: for child in right_side.get_children(): child.visible = false - var selected := tree.get_selected().get_text(0) + var selected : String = tree.get_selected().get_metadata(0) if "Language" in selected: languages.visible = true elif "Themes" in selected: diff --git a/Scripts/Dialogs/SplashDialog.gd b/Scripts/Dialogs/SplashDialog.gd index 061617bbf..00722bad2 100644 --- a/Scripts/Dialogs/SplashDialog.gd +++ b/Scripts/Dialogs/SplashDialog.gd @@ -1,4 +1,10 @@ extends WindowDialog +func _on_SplashDialog_about_to_show() -> void: + var current_version : String = ProjectSettings.get_setting("application/config/Version") + window_title = "Pixelorama" + " " + current_version + $Contents/DevelopedBy.text = "Pixelorama" + " " + current_version + " - " + tr("MADEBY_LABEL") + func _on_ArtCredits_pressed() -> void: OS.shell_open("https://www.instagram.com/erevos_art") +