diff --git a/assets/graphics/dark_themes/timeline/move_arrow.png b/assets/graphics/dark_themes/timeline/move_arrow.png index fc8ed305f..f5591029b 100644 Binary files a/assets/graphics/dark_themes/timeline/move_arrow.png and b/assets/graphics/dark_themes/timeline/move_arrow.png differ diff --git a/assets/graphics/dark_themes/timeline/move_arrow_disabled.png b/assets/graphics/dark_themes/timeline/move_arrow_disabled.png new file mode 100644 index 000000000..3f9482a29 Binary files /dev/null and b/assets/graphics/dark_themes/timeline/move_arrow_disabled.png differ diff --git a/assets/graphics/dark_themes/timeline/move_arrow_disabled.png.import b/assets/graphics/dark_themes/timeline/move_arrow_disabled.png.import new file mode 100644 index 000000000..4684f51c5 --- /dev/null +++ b/assets/graphics/dark_themes/timeline/move_arrow_disabled.png.import @@ -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 diff --git a/assets/graphics/light_themes/timeline/move_arrow.png b/assets/graphics/light_themes/timeline/move_arrow.png index 5050ce3f7..c167c1d62 100644 Binary files a/assets/graphics/light_themes/timeline/move_arrow.png and b/assets/graphics/light_themes/timeline/move_arrow.png differ diff --git a/assets/graphics/light_themes/timeline/move_arrow_disabled.png b/assets/graphics/light_themes/timeline/move_arrow_disabled.png new file mode 100644 index 000000000..2d90ffc2b Binary files /dev/null and b/assets/graphics/light_themes/timeline/move_arrow_disabled.png differ diff --git a/assets/graphics/light_themes/timeline/move_arrow_disabled.png.import b/assets/graphics/light_themes/timeline/move_arrow_disabled.png.import new file mode 100644 index 000000000..38ad56d4d --- /dev/null +++ b/assets/graphics/light_themes/timeline/move_arrow_disabled.png.import @@ -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 diff --git a/src/Autoload/Global.gd b/src/Autoload/Global.gd index 73a454f96..5074176e3 100644 --- a/src/Autoload/Global.gd +++ b/src/Autoload/Global.gd @@ -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") diff --git a/src/Classes/Project.gd b/src/Classes/Project.gd index 3582f4674..dff832cad 100644 --- a/src/Classes/Project.gd +++ b/src/Classes/Project.gd @@ -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 diff --git a/src/UI/Timeline/AnimationTimeline.tscn b/src/UI/Timeline/AnimationTimeline.tscn index d05cf4225..e9cb45812 100644 --- a/src/UI/Timeline/AnimationTimeline.tscn +++ b/src/UI/Timeline/AnimationTimeline.tscn @@ -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