mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Made the remove frame button get disabled when there's only one frame
This commit is contained in:
parent
2ee4c541c9
commit
2b5f6b47ee
BIN
Assets/Graphics/dark_themes/timeline/remove_frame_disabled.png
Normal file
BIN
Assets/Graphics/dark_themes/timeline/remove_frame_disabled.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 93 B |
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/remove_frame_disabled.png-0b0bf95063e120cabfe225b5e96232e6.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Graphics/dark_themes/timeline/remove_frame_disabled.png"
|
||||
dest_files=[ "res://.import/remove_frame_disabled.png-0b0bf95063e120cabfe225b5e96232e6.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
BIN
Assets/Graphics/light_themes/timeline/remove_frame_disabled.png
Normal file
BIN
Assets/Graphics/light_themes/timeline/remove_frame_disabled.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 93 B |
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/remove_frame_disabled.png-788471f1b29606174c549e45209f03ca.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Graphics/light_themes/timeline/remove_frame_disabled.png"
|
||||
dest_files=[ "res://.import/remove_frame_disabled.png-788471f1b29606174c549e45209f03ca.stex" ]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_mode=0
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
flags/repeat=0
|
||||
flags/filter=false
|
||||
flags/mipmaps=false
|
||||
flags/anisotropic=false
|
||||
flags/srgb=2
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/invert_color=false
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
|
@ -243,6 +243,8 @@ var frames_container : VBoxContainer
|
|||
var tag_container : Control
|
||||
var tag_dialog : AcceptDialog
|
||||
|
||||
var remove_frame_button : BaseButton
|
||||
|
||||
var remove_layer_button : BaseButton
|
||||
var move_up_layer_button : BaseButton
|
||||
var move_down_layer_button : BaseButton
|
||||
|
@ -374,6 +376,8 @@ func _ready() -> void:
|
|||
tag_container = find_node_by_name(animation_timeline, "TagContainer")
|
||||
tag_dialog = find_node_by_name(animation_timeline, "FrameTagDialog")
|
||||
|
||||
remove_frame_button = find_node_by_name(animation_timeline, "DeleteFrame")
|
||||
|
||||
remove_layer_button = find_node_by_name(animation_timeline, "RemoveLayer")
|
||||
move_up_layer_button = find_node_by_name(animation_timeline, "MoveUpLayer")
|
||||
move_down_layer_button = find_node_by_name(animation_timeline, "MoveDownLayer")
|
||||
|
@ -640,6 +644,11 @@ func frame_changed(value : int) -> void:
|
|||
if current_frame < layers[current_layer][3].get_child_count():
|
||||
layers[current_layer][3].get_child(current_frame).pressed = true
|
||||
|
||||
if canvases.size() == 1:
|
||||
disable_button(remove_frame_button, true)
|
||||
elif !layers[current_layer][2]:
|
||||
disable_button(remove_frame_button, false)
|
||||
|
||||
Global.transparent_checker._ready() # To update the rect size
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue