From 6025271e2957d507f83c8a28586bc8039d89eef7 Mon Sep 17 00:00:00 2001 From: Schweini07 <47503977+Schweini07@users.noreply.github.com> Date: Wed, 1 Jan 2020 16:00:28 +0100 Subject: [PATCH 1/4] Make the Splash Screen popup optional --- Prefabs/Dialogs/SplashDialog.tscn | 24 +++++++++++++++++------- Scripts/Dialogs/SplashDialog.gd | 6 ++++++ Scripts/Global.gd | 2 ++ Scripts/Main.gd | 13 ++++++++++--- 4 files changed, 35 insertions(+), 10 deletions(-) diff --git a/Prefabs/Dialogs/SplashDialog.tscn b/Prefabs/Dialogs/SplashDialog.tscn index ab3244d..737c3d3 100644 --- a/Prefabs/Dialogs/SplashDialog.tscn +++ b/Prefabs/Dialogs/SplashDialog.tscn @@ -7,9 +7,12 @@ [node name="SplashDialog" type="WindowDialog"] margin_right = 400.0 -margin_bottom = 380.0 +margin_bottom = 399.0 rect_min_size = Vector2( 400, 380 ) script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} [node name="Contents" type="VBoxContainer" parent="."] anchor_right = 1.0 @@ -45,25 +48,32 @@ mouse_default_cursor_shape = 2 text = "Art by Erevoid" flat = true -[node name="HSeparator2" type="HSeparator" parent="Contents"] +[node name="CheckBox" type="CheckBox" parent="Contents"] margin_top = 330.0 margin_right = 400.0 -margin_bottom = 334.0 +margin_bottom = 354.0 +text = "Don't show on the next startup" + +[node name="HSeparator2" type="HSeparator" parent="Contents"] +margin_top = 358.0 +margin_right = 400.0 +margin_bottom = 362.0 [node name="DevelopedBy" type="Label" parent="Contents"] -margin_top = 338.0 +margin_top = 366.0 margin_right = 400.0 -margin_bottom = 351.0 +margin_bottom = 379.0 custom_fonts/font = ExtResource( 4 ) text = "Pixelorama v0.6 - Developed by Orama Interactive" align = 1 [node name="Copyright" type="Label" parent="Contents"] -margin_top = 355.0 +margin_top = 383.0 margin_right = 400.0 -margin_bottom = 368.0 +margin_bottom = 396.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"] +[connection signal="toggled" from="Contents/CheckBox" to="." method="_on_CheckBox_toggled"] diff --git a/Scripts/Dialogs/SplashDialog.gd b/Scripts/Dialogs/SplashDialog.gd index 7dfde3c..64871bb 100644 --- a/Scripts/Dialogs/SplashDialog.gd +++ b/Scripts/Dialogs/SplashDialog.gd @@ -9,3 +9,9 @@ func _on_SplashDialog_about_to_show() -> void: func _on_ArtCredits_pressed() -> void: OS.shell_open("https://www.instagram.com/erevos_art") + +func _on_CheckBox_toggled(pressed) -> void: + if pressed: + Global.config_cache.set_value("preferences", "startup", false) + else: + Global.config_cache.set_value("preferences", "startup", true) diff --git a/Scripts/Global.gd b/Scripts/Global.gd index 2d0dd81..2e23e73 100644 --- a/Scripts/Global.gd +++ b/Scripts/Global.gd @@ -215,6 +215,8 @@ var palette_import_file_dialog : FileDialog var error_dialog : AcceptDialog +var startup : bool + func _ready() -> void: randomize() # Load settings from the config file diff --git a/Scripts/Main.gd b/Scripts/Main.gd index 05e0747..6d90ac1 100644 --- a/Scripts/Main.gd +++ b/Scripts/Main.gd @@ -156,8 +156,15 @@ func _ready() -> void: Import.import_brushes("Brushes") - $SplashDialog.popup_centered() # Splash screen - OS.set_window_title("(" + tr("untitled") + ") - Pixelorama") + if Global.config_cache.has_section_key("preferences", "startup"): + Global.startup = Global.config_cache.get_value("preferences", "startup") + else: + Global.startup = true + Global.config_cache.set_value("preferences", "startup", Global.startup) + + if Global.config_cache.get_value("preferences", "startup"): + $SplashDialog.popup_centered() # Splash screen + OS.set_window_title("(" + tr("untitled") + ") - Pixelorama") func _input(event : InputEvent) -> void: Global.left_cursor.position = get_global_mouse_position() + Vector2(-32, 32) @@ -925,4 +932,4 @@ func _on_QuitDialog_confirmed() -> void: # (it won't respond to user input in this state). modulate = Color(0.5, 0.5, 0.5) - get_tree().quit() \ No newline at end of file + get_tree().quit() From 13fa0bbc54c2157246027b50f01da4599d05ec0e Mon Sep 17 00:00:00 2001 From: Schweini07 <47503977+Schweini07@users.noreply.github.com> Date: Wed, 1 Jan 2020 16:26:58 +0100 Subject: [PATCH 2/4] Destroyed the bug --- Scripts/Dialogs/SplashDialog.gd | 6 ------ Scripts/Global.gd | 2 -- Scripts/Main.gd | 14 +++++--------- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/Scripts/Dialogs/SplashDialog.gd b/Scripts/Dialogs/SplashDialog.gd index 64871bb..7dfde3c 100644 --- a/Scripts/Dialogs/SplashDialog.gd +++ b/Scripts/Dialogs/SplashDialog.gd @@ -9,9 +9,3 @@ func _on_SplashDialog_about_to_show() -> void: func _on_ArtCredits_pressed() -> void: OS.shell_open("https://www.instagram.com/erevos_art") - -func _on_CheckBox_toggled(pressed) -> void: - if pressed: - Global.config_cache.set_value("preferences", "startup", false) - else: - Global.config_cache.set_value("preferences", "startup", true) diff --git a/Scripts/Global.gd b/Scripts/Global.gd index 2e23e73..2d0dd81 100644 --- a/Scripts/Global.gd +++ b/Scripts/Global.gd @@ -215,8 +215,6 @@ var palette_import_file_dialog : FileDialog var error_dialog : AcceptDialog -var startup : bool - func _ready() -> void: randomize() # Load settings from the config file diff --git a/Scripts/Main.gd b/Scripts/Main.gd index 6d90ac1..264e1cb 100644 --- a/Scripts/Main.gd +++ b/Scripts/Main.gd @@ -156,15 +156,11 @@ func _ready() -> void: Import.import_brushes("Brushes") - if Global.config_cache.has_section_key("preferences", "startup"): - Global.startup = Global.config_cache.get_value("preferences", "startup") - else: - Global.startup = true - Global.config_cache.set_value("preferences", "startup", Global.startup) - - if Global.config_cache.get_value("preferences", "startup"): - $SplashDialog.popup_centered() # Splash screen - OS.set_window_title("(" + tr("untitled") + ") - Pixelorama") + $SplashDialog.popup_centered() # Splash screen + if not Global.config_cache.get_value("preferences", "startup"): + $SplashDialog.hide() + + OS.set_window_title("(" + tr("untitled") + ") - Pixelorama") func _input(event : InputEvent) -> void: Global.left_cursor.position = get_global_mouse_position() + Vector2(-32, 32) From 4356263aecae8484781b8b8600f3997d00b22456 Mon Sep 17 00:00:00 2001 From: Schweini07 <47503977+Schweini07@users.noreply.github.com> Date: Wed, 1 Jan 2020 16:33:32 +0100 Subject: [PATCH 3/4] Update SplashDialog.gd --- Scripts/Dialogs/SplashDialog.gd | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Scripts/Dialogs/SplashDialog.gd b/Scripts/Dialogs/SplashDialog.gd index 7dfde3c..64871bb 100644 --- a/Scripts/Dialogs/SplashDialog.gd +++ b/Scripts/Dialogs/SplashDialog.gd @@ -9,3 +9,9 @@ func _on_SplashDialog_about_to_show() -> void: func _on_ArtCredits_pressed() -> void: OS.shell_open("https://www.instagram.com/erevos_art") + +func _on_CheckBox_toggled(pressed) -> void: + if pressed: + Global.config_cache.set_value("preferences", "startup", false) + else: + Global.config_cache.set_value("preferences", "startup", true) From 413794bb433682f262d023bc59a5d29129642bd2 Mon Sep 17 00:00:00 2001 From: Schweini07 <47503977+Schweini07@users.noreply.github.com> Date: Wed, 1 Jan 2020 16:45:03 +0100 Subject: [PATCH 4/4] German localization UPDATE --- Translations/de.po | 80 +++++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/Translations/de.po b/Translations/de.po index 461bd0b..44bdd1f 100644 --- a/Translations/de.po +++ b/Translations/de.po @@ -50,10 +50,10 @@ msgstr "Ansicht" #, fuzzy msgid "Image" -msgstr "Bildgröße" +msgstr "Bild" msgid "Effects" -msgstr "" +msgstr "Effekte" msgid "Help" msgstr "Hilfe" @@ -148,10 +148,10 @@ msgid "Export Sprite" msgstr "Exportiere Sprite" msgid "File Exists, Overwrite?" -msgstr "" +msgstr "Datei existiert schon, überschreiben?" msgid "Resize:" -msgstr "" +msgstr "Größe verändern" #, fuzzy msgid "EXPORT_CURRENT_FRAME_LABEL" @@ -166,10 +166,10 @@ msgid "EXPORT_FRAMES_AS_SPRITESHEET_LABEL" msgstr "Vertikales Spritesheet" msgid "Columns" -msgstr "" +msgstr "Spalten" msgid "Rows" -msgstr "" +msgstr "Reihen" msgid "Path:" msgstr "Pfad:" @@ -178,7 +178,7 @@ msgid "Directories & Files:" msgstr "Verzeichnisse & Dateien:" msgid "Create Folder" -msgstr "" +msgstr "Erstelle Ordner" msgid "File:" msgstr "Datei:" @@ -203,18 +203,18 @@ msgid "Language" msgstr "Sprache:" msgid "Themes" -msgstr "" +msgstr "Designs" msgid "Guides & Grid" -msgstr "" +msgstr "Guides & Gitter" #, fuzzy msgid "Language options" -msgstr "Sprache:" +msgstr "Sprachoptionen" #, fuzzy msgid "Theme options" -msgstr "Gitter Optionen" +msgstr "Design Optionen" msgid "Grid options" msgstr "Gitter Optionen" @@ -223,7 +223,7 @@ msgid "Color:" msgstr "Farbe:" msgid "Guide color:" -msgstr "" +msgstr "Guidefarbe" msgid "System Language" msgstr "Systemsprache" @@ -243,31 +243,31 @@ msgid "Light" msgstr "Erhellen" msgid "Invert colors" -msgstr "" +msgstr "Kehre Farben um" msgid "Desaturation" -msgstr "" +msgstr "Entsättigung" msgid "Outline" -msgstr "" +msgstr "Umriss" msgid "Diagonal" -msgstr "" +msgstr "Diagonal" msgid "Place inside image" -msgstr "" +msgstr "Platziere in Bild" msgid "Thickness:" -msgstr "" +msgstr "Dicke:" msgid "View Splash Screen" -msgstr "" +msgstr "Zeige Splash Screen" msgid "Issue Tracker" -msgstr "" +msgstr "Issue Tracker" msgid "Changelog" -msgstr "" +msgstr "Änderungsprotokoll" msgid "About Pixelorama" msgstr "Über Pixelorama" @@ -282,32 +282,32 @@ msgid "Donate" msgstr "Spenden" msgid "Developers" -msgstr "" +msgstr "Entwickler" msgid "Contributors" -msgstr "" +msgstr "Beitragende" msgid "Donors" -msgstr "" +msgstr "Spender" msgid "Development Team" -msgstr "" +msgstr "Entwicklerteam" msgid "GitHub Contributors" -msgstr "" +msgstr "Github Beitragende" msgid "Art by" -msgstr "" +msgstr "Kunst von" msgid "untitled" -msgstr "" +msgstr "unbenannt" #, fuzzy msgid "imported" msgstr "Datei exportiert" msgid "copy" -msgstr "" +msgstr "kopiere" msgid "QUIT_LABEL" msgstr "Möchten sie Pixelorama wirklich verlassen?" @@ -574,25 +574,25 @@ msgid "LAYERMERGE_HT" msgstr "Führe Ebene mit der darunter zusammen" msgid "Opacity:" -msgstr "" +msgstr "Deckkraft" msgid "LAYERVISIBILITY_HT" msgstr "Ändere die Sichtbarkeit der Ebene" msgid "Palette" -msgstr "" +msgstr "Palette" msgid "Palettes" -msgstr "" +msgstr "Paletten" msgid "NEWPALETTE_HT" -msgstr "" +msgstr "Füge eine neue Palette hinzu" msgid "EDITPALETTE_HT" -msgstr "" +msgstr "Bearbeite ausgewählte Palette" msgid "CHOOSEPALETTE_HT" -msgstr "" +msgstr "Wähle Palette" msgid "Undo: Draw" msgstr "Rückgängig: Zeichen" @@ -670,23 +670,23 @@ msgid "File exported" msgstr "Datei exportiert" msgid "New Empty Palette" -msgstr "" +msgstr "Neue leere Palette" msgid "Import Palette" -msgstr "" +msgstr "Importiere Palette" msgid "Palette Name:" -msgstr "" +msgstr "Palettenname" #, fuzzy msgid "Color Name:" msgstr "Farbe:" msgid "Create a new empty palette?" -msgstr "" +msgstr "Erstelle eine neue leere Palette" msgid "Edit Palette" -msgstr "" +msgstr "Bearbeite Palette" #~ msgid "Language:" #~ msgstr "Sprache:"