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

Made the frame move buttons get disabled when you can't move frames

This commit is contained in:
OverloadedOrama 2020-10-05 02:37:55 +03:00
parent a5da9aaeb9
commit fbbdcdaa57
9 changed files with 86 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 B

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/move_arrow_disabled.png-52a5629e1ae2c34034b70ce489237c77.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/dark_themes/timeline/move_arrow_disabled.png"
dest_files=[ "res://.import/move_arrow_disabled.png-52a5629e1ae2c34034b70ce489237c77.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/move_arrow_disabled.png-c34712e4f610edb14fd2ab4a585a557a.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/graphics/light_themes/timeline/move_arrow_disabled.png"
dest_files=[ "res://.import/move_arrow_disabled.png-c34712e4f610edb14fd2ab4a585a557a.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

View file

@ -139,6 +139,8 @@ var tag_container : Control
var tag_dialog : AcceptDialog
var remove_frame_button : BaseButton
var move_left_frame_button : BaseButton
var move_right_frame_button : BaseButton
var remove_layer_button : BaseButton
var move_up_layer_button : BaseButton
@ -233,6 +235,8 @@ func _ready() -> void:
tag_dialog = find_node_by_name(animation_timeline, "FrameTagDialog")
remove_frame_button = find_node_by_name(animation_timeline, "DeleteFrame")
move_left_frame_button = find_node_by_name(animation_timeline, "MoveLeft")
move_right_frame_button = find_node_by_name(animation_timeline, "MoveRight")
remove_layer_button = find_node_by_name(animation_timeline, "RemoveLayer")
move_up_layer_button = find_node_by_name(animation_timeline, "MoveUpLayer")

View file

@ -136,6 +136,8 @@ func change_project() -> void:
Global.current_frame_mark_label.text = "%s/%s" % [str(current_frame + 1), frames.size()]
Global.disable_button(Global.remove_frame_button, frames.size() == 1)
Global.disable_button(Global.move_left_frame_button, frames.size() == 1 or current_frame == 0)
Global.disable_button(Global.move_right_frame_button, frames.size() == 1 or current_frame == frames.size() - 1)
toggle_layer_buttons_layers()
toggle_layer_buttons_current_layer()
@ -436,6 +438,8 @@ func frame_changed(value : int) -> void:
layers[current_layer].frame_container.get_child(current_frame).pressed = true
Global.disable_button(Global.remove_frame_button, frames.size() == 1)
Global.disable_button(Global.move_left_frame_button, frames.size() == 1 or current_frame == 0)
Global.disable_button(Global.move_right_frame_button, frames.size() == 1 or current_frame == frames.size() - 1)
Global.canvas.update()
Global.transparent_checker._ready() # To update the rect size

View file

@ -465,6 +465,7 @@ margin_right = 116.0
margin_bottom = 22.0
rect_min_size = Vector2( 20, 0 )
hint_tooltip = "Move the selected frame to the left."
focus_mode = 0
mouse_default_cursor_shape = 2
size_flags_horizontal = 0
size_flags_vertical = 4
@ -474,10 +475,10 @@ anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -7.0
margin_top = -7.0
margin_right = 8.0
margin_bottom = 8.0
margin_left = -7.5
margin_top = -5.5
margin_right = 7.5
margin_bottom = 5.5
texture = ExtResource( 8 )
flip_h = true
__meta__ = {
@ -493,6 +494,7 @@ margin_right = 140.0
margin_bottom = 22.0
rect_min_size = Vector2( 20, 0 )
hint_tooltip = "Move the selected frame to the right."
focus_mode = 0
mouse_default_cursor_shape = 2
size_flags_horizontal = 0
size_flags_vertical = 4
@ -502,10 +504,10 @@ anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -7.0
margin_top = -7.0
margin_right = 7.0
margin_bottom = 7.0
margin_left = -7.5
margin_top = -5.5
margin_right = 7.5
margin_bottom = 5.5
texture = ExtResource( 8 )
__meta__ = {
"_edit_use_anchors_": false