1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 09:09:47 +00:00

Import as new frame on ImportSprites dialog now ticked on by default

This commit is contained in:
OverloadedOrama 2019-12-30 04:06:37 +02:00
parent ad2e1062ee
commit be91e65c55
4 changed files with 8 additions and 7 deletions

View file

@ -23,12 +23,15 @@ margin_bottom = 312.0
[node name="ImportAsNewFrame" type="CheckBox" parent="HBoxContainer2"] [node name="ImportAsNewFrame" type="CheckBox" parent="HBoxContainer2"]
margin_right = 156.0 margin_right = 156.0
margin_bottom = 304.0 margin_bottom = 304.0
mouse_default_cursor_shape = 2
pressed = true
text = "IMPORT_FILE_LABEL" text = "IMPORT_FILE_LABEL"
[node name="ImportSpritesheet" type="CheckBox" parent="HBoxContainer2"] [node name="ImportSpritesheet" type="CheckBox" parent="HBoxContainer2"]
margin_left = 160.0 margin_left = 160.0
margin_right = 327.0 margin_right = 327.0
margin_bottom = 304.0 margin_bottom = 304.0
mouse_default_cursor_shape = 2
text = "Import as spritesheet" text = "Import as spritesheet"
[node name="Spritesheet" type="HBoxContainer" parent="."] [node name="Spritesheet" type="HBoxContainer" parent="."]

View file

@ -15,4 +15,3 @@ func _on_CreateNewImage_confirmed() -> void:
Global.canvas.layers[0][0].fill(fill_color) Global.canvas.layers[0][0].fill(fill_color)
Global.canvas.layers[0][0].lock() Global.canvas.layers[0][0].lock()
Global.canvas.update_texture(0) Global.canvas.update_texture(0)
Global.undo_redo.clear_history(false)

View file

@ -1,6 +1,6 @@
extends FileDialog extends FileDialog
var new_frame := false var new_frame := true
var import_spritesheet := false var import_spritesheet := false
var spritesheet_horizontal := 1 var spritesheet_horizontal := 1
var spritesheet_vertical := 1 var spritesheet_vertical := 1
@ -107,6 +107,5 @@ func _on_ImportSprites_files_selected(paths : PoolStringArray) -> void:
Global.canvas = Global.canvases[Global.canvases.size() - 1] Global.canvas = Global.canvases[Global.canvases.size() - 1]
Global.canvas.visible = true Global.canvas.visible = true
Global.undo_redo.clear_history(false)
OS.set_window_title(first_path.get_file() + " (imported) - Pixelorama") OS.set_window_title(first_path.get_file() + " (imported) - Pixelorama")

View file

@ -431,7 +431,6 @@ func _on_OpenSprite_file_selected(path : String) -> void:
brush_line = file.get_line() brush_line = file.get_line()
file.close() file.close()
Global.undo_redo.clear_history(false)
OS.set_window_title(path.get_file() + " - Pixelorama") OS.set_window_title(path.get_file() + " - Pixelorama")
@ -503,6 +502,7 @@ func clear_canvases() -> void:
current_save_path = "" current_save_path = ""
$ExportSprites.current_export_path = "" $ExportSprites.current_export_path = ""
file_menu.set_item_text(5, "Export PNG...") file_menu.set_item_text(5, "Export PNG...")
Global.undo_redo.clear_history(false)
func _on_ImportSprites_popup_hide() -> void: func _on_ImportSprites_popup_hide() -> void:
if !opensprite_file_selected: if !opensprite_file_selected:
@ -721,17 +721,17 @@ func add_frame() -> void:
func _on_LoopAnim_pressed() -> void: func _on_LoopAnim_pressed() -> void:
match animation_loop: match animation_loop:
0: 0:
#Make it loop # Make it loop
animation_loop = 1 animation_loop = 1
Global.loop_animation_button.texture_normal = load("res://Assets/Graphics/%s Themes/Timeline/Loop.png" % Global.theme_type) Global.loop_animation_button.texture_normal = load("res://Assets/Graphics/%s Themes/Timeline/Loop.png" % Global.theme_type)
Global.loop_animation_button.hint_tooltip = "Cycle loop" Global.loop_animation_button.hint_tooltip = "Cycle loop"
1: 1:
#Make it ping-pong # Make it ping-pong
animation_loop = 2 animation_loop = 2
Global.loop_animation_button.texture_normal = load("res://Assets/Graphics/%s Themes/Timeline/Loop_PingPong.png" % Global.theme_type) Global.loop_animation_button.texture_normal = load("res://Assets/Graphics/%s Themes/Timeline/Loop_PingPong.png" % Global.theme_type)
Global.loop_animation_button.hint_tooltip = "Ping-pong loop" Global.loop_animation_button.hint_tooltip = "Ping-pong loop"
2: 2:
#Make it stop # Make it stop
animation_loop = 0 animation_loop = 0
Global.loop_animation_button.texture_normal = load("res://Assets/Graphics/%s Themes/Timeline/Loop_None.png" % Global.theme_type) Global.loop_animation_button.texture_normal = load("res://Assets/Graphics/%s Themes/Timeline/Loop_None.png" % Global.theme_type)
Global.loop_animation_button.hint_tooltip = "No loop" Global.loop_animation_button.hint_tooltip = "No loop"