mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 17:24:44 -04:00
Use setter method for layers to update the UI
Instead of updating it in undo and redo methods
This commit is contained in:
parent
2bfae68755
commit
60aed9efba
6 changed files with 96 additions and 51 deletions
|
@ -5,11 +5,15 @@ var layer := 0
|
|||
|
||||
onready var popup_menu := $PopupMenu
|
||||
|
||||
func _ready() -> void:
|
||||
hint_tooltip = "Frame: %s, Layer: %s" % [frame, layer]
|
||||
|
||||
func _on_FrameButton_pressed() -> void:
|
||||
if Input.is_action_just_released("left_mouse"):
|
||||
Global.current_frame = frame
|
||||
Global.current_layer = layer
|
||||
print(str(frame), str(layer))
|
||||
print("Current layer: %s" % Global.current_layer)
|
||||
elif Input.is_action_just_released("right_mouse"):
|
||||
if Global.canvases.size() == 1:
|
||||
popup_menu.set_item_disabled(0, true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue