mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-22 05:23:14 +00:00
Delay the splash screen popup so it shows properly centered
This commit is contained in:
parent
24480ede6f
commit
1cde435d1a
1 changed files with 4 additions and 1 deletions
|
@ -156,7 +156,6 @@ func _ready() -> void:
|
||||||
|
|
||||||
Import.import_brushes("Brushes")
|
Import.import_brushes("Brushes")
|
||||||
|
|
||||||
$SplashDialog.popup_centered() # Splash screen
|
|
||||||
if not Global.config_cache.has_section_key("preferences", "startup"):
|
if not Global.config_cache.has_section_key("preferences", "startup"):
|
||||||
Global.config_cache.set_value("preferences", "startup", true)
|
Global.config_cache.set_value("preferences", "startup", true)
|
||||||
if not Global.config_cache.get_value("preferences", "startup"):
|
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.layers[0][2] = tr("Layer") + " 0"
|
||||||
Global.canvas.generate_layer_panels()
|
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:
|
func _input(event : InputEvent) -> void:
|
||||||
Global.left_cursor.position = get_global_mouse_position() + Vector2(-32, 32)
|
Global.left_cursor.position = get_global_mouse_position() + Vector2(-32, 32)
|
||||||
Global.left_cursor.texture = Global.left_cursor_tool_texture
|
Global.left_cursor.texture = Global.left_cursor_tool_texture
|
||||||
|
|
Loading…
Add table
Reference in a new issue