Put default value for "show on startup" in config_cache file

Also put the checkbutton's string on the translation files
This commit is contained in:
OverloadedOrama 2020-01-01 20:04:13 +02:00
parent 9e9dbcb920
commit 78609a86fb
13 changed files with 34 additions and 6 deletions

View file

@ -10,8 +10,8 @@ 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:
func _on_ShowOnStartup_toggled(pressed : bool) -> void:
if pressed:
Global.config_cache.set_value("preferences", "startup", false)
else:
Global.config_cache.set_value("preferences", "startup", true)
Global.config_cache.set_value("preferences", "startup", true)

View file

@ -157,9 +157,11 @@ func _ready() -> void:
Import.import_brushes("Brushes")
$SplashDialog.popup_centered() # Splash screen
if not Global.config_cache.has_section_key("preferences", "startup"):
Global.config_cache.set_value("preferences", "startup", true)
if not Global.config_cache.get_value("preferences", "startup"):
$SplashDialog.hide()
OS.set_window_title("(" + tr("untitled") + ") - Pixelorama")
func _input(event : InputEvent) -> void: