1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-20 12:33:14 +00:00

Delay the splash screen popup so it shows properly centered

This commit is contained in:
Michael Alexsander 2020-01-14 00:44:16 -03:00
parent 24480ede6f
commit 1cde435d1a

View file

@ -156,7 +156,6 @@ 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"):
@ -167,6 +166,10 @@ func _ready() -> void:
Global.canvas.layers[0][2] = tr("Layer") + " 0"
Global.canvas.generate_layer_panels()
# 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
func _input(event : InputEvent) -> void:
Global.left_cursor.position = get_global_mouse_position() + Vector2(-32, 32)
Global.left_cursor.texture = Global.left_cursor_tool_texture