1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-31 07:29:49 +00:00

Makes sure that BackupConfirmation dialog is properly centered

Moved yield(get_tree().create_timer(0.01), "timeout") in _ready() of Main.gd outside of the if, to affect the BackupConfirmation dialog too.
This commit is contained in:
OverloadedOrama 2020-05-02 18:10:01 +03:00
parent b70fae36a3
commit babd5759f8
2 changed files with 4 additions and 2 deletions

View file

@ -184,9 +184,10 @@ func _ready() -> void:
if not Global.config_cache.has_section_key("preferences", "startup"):
Global.config_cache.set_value("preferences", "startup", true)
# Wait for the window to adjust itself, so the popup is correctly centered
yield(get_tree().create_timer(0.01), "timeout")
if Global.config_cache.get_value("preferences", "startup"):
# Wait for the window to adjust itself, so the popup is correctly centered
yield(get_tree().create_timer(0.01), "timeout")
$SplashDialog.popup_centered() # Splash screen
else:
Global.can_draw = true

View file

@ -37,6 +37,7 @@ func _on_ShowOnStartup_toggled(pressed : bool) -> void:
Global.config_cache.set_value("preferences", "startup", false)
else:
Global.config_cache.set_value("preferences", "startup", true)
Global.config_cache.save("user://cache.ini")
func _on_PatreonButton_pressed() -> void: