mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 17:24:44 -04:00
Opening .pxo files directly with Pixelorama is now also supported
Also added "-> void" to the methods that did not already have it
This commit is contained in:
parent
45a31faa7b
commit
9e7a3059f2
5 changed files with 25 additions and 20 deletions
|
@ -152,6 +152,19 @@ func _ready() -> void:
|
|||
Global.left_color_picker.get_picker().move_child(Global.left_color_picker.get_picker().get_child(0), 1)
|
||||
Global.right_color_picker.get_picker().move_child(Global.right_color_picker.get_picker().get_child(0), 1)
|
||||
|
||||
if OS.get_cmdline_args():
|
||||
for arg in OS.get_cmdline_args():
|
||||
print(arg)
|
||||
if arg.get_extension().to_lower() == "pxo":
|
||||
_on_OpenSprite_file_selected(arg)
|
||||
else:
|
||||
$ImportSprites._on_ImportSprites_files_selected([arg])
|
||||
|
||||
OS.set_window_title("(" + tr("untitled") + ") - Pixelorama")
|
||||
|
||||
Global.canvas.layers[0][2] = tr("Layer") + " 0"
|
||||
Global.canvas.generate_layer_panels()
|
||||
|
||||
Import.import_brushes("Brushes")
|
||||
|
||||
if not Global.config_cache.has_section_key("preferences", "startup"):
|
||||
|
@ -159,11 +172,6 @@ func _ready() -> void:
|
|||
if not Global.config_cache.get_value("preferences", "startup"):
|
||||
$SplashDialog.hide()
|
||||
|
||||
OS.set_window_title("(" + tr("untitled") + ") - Pixelorama")
|
||||
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue