mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 15:34:43 -04:00
Add/remove/move frames should now work
With Undo/Redo. Cloning frames doesn't work yet, will fix shortly.
This commit is contained in:
parent
98e6b0f56b
commit
120e47d0f9
2 changed files with 30 additions and 23 deletions
|
@ -31,7 +31,6 @@ var pen_pressure := 1.0 # For tablet pressure sensitivity
|
|||
func _ready() -> void:
|
||||
var fill_layers := layers.empty()
|
||||
for i in range(Global.layers.size()):
|
||||
print(i)
|
||||
if fill_layers:
|
||||
# The sprite itself
|
||||
var sprite := Image.new()
|
||||
|
@ -54,14 +53,6 @@ func _ready() -> void:
|
|||
# Store [Image, ImageTexture, Opacity]
|
||||
layers.append([sprite, tex, 1])
|
||||
|
||||
var frame_button = load("res://Prefabs/FrameButton.tscn").instance()
|
||||
frame_button.frame = frame
|
||||
frame_button.layer = i
|
||||
frame_button.pressed = true
|
||||
#frame_button.get_node("FrameID").text = str(frame + 1)
|
||||
#frame_button.get_node("FrameID").add_color_override("font_color", Color("#3c5d75"))
|
||||
Global.layers[i][2].add_child(frame_button)
|
||||
|
||||
# Only handle camera zoom settings & offset on the first frame
|
||||
if Global.canvases[0] == self:
|
||||
camera_zoom()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue