Big changes to timeline buttons

They're no longer TextureButtons, but Buttons with TextureRect as children. This makes it easier to make them work for multiple themes, and we also save some disk space.

More buttons will follow soon.
This commit is contained in:
OverloadedOrama 2020-04-30 16:36:00 +03:00
parent 4ef2c482d8
commit e05fc26f5a
269 changed files with 1014 additions and 2292 deletions

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=65 format=2]
[gd_scene load_steps=51 format=2]
[ext_resource path="res://Scripts/AnimationTimeline.gd" type="Script" id=1]
[ext_resource path="res://Assets/Graphics/Dark Themes/Layers/New_Layer.png" type="Texture" id=2]
@ -18,34 +18,20 @@
[ext_resource path="res://Assets/Graphics/Dark Themes/Layers/Merge_Down_Hover.png" type="Texture" id=16]
[ext_resource path="res://Assets/Graphics/Dark Themes/Layers/Merge_Down_Disabled.png" type="Texture" id=17]
[ext_resource path="res://Prefabs/LayerContainer.tscn" type="PackedScene" id=18]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/New_Frame.png" type="Texture" id=19]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/New_Frame_Hover.png" type="Texture" id=20]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Go_To_First_Frame.png" type="Texture" id=21]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Go_To_First_Frame_Hover.png" type="Texture" id=22]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Previous_Frame.png" type="Texture" id=23]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Previous_Frame_Hover.png" type="Texture" id=24]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Play Backwards.png" type="Texture" id=25]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Pause.png" type="Texture" id=26]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Play Backwards_Hover.png" type="Texture" id=27]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Play.png" type="Texture" id=28]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Play_Hover.png" type="Texture" id=29]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Next_Frame.png" type="Texture" id=30]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Next_Frame_Hover.png" type="Texture" id=31]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Go_To_Last_Frame.png" type="Texture" id=32]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Go_To_Last_Frame_Hover.png" type="Texture" id=33]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Loop_Hover.png" type="Texture" id=34]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Onion_Skinning_Off.png" type="Texture" id=35]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Onion_Skinning_Off_Hover.png" type="Texture" id=36]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Loop.png" type="Texture" id=37]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Expandable.png" type="Texture" id=38]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Expandable_Hover.png" type="Texture" id=39]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Tag_Hover.png" type="Texture" id=40]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Tag.png" type="Texture" id=41]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/new_frame.png" type="Texture" id=19]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/remove_frame.png" type="Texture" id=20]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/go_to_first_frame.png" type="Texture" id=21]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/play.png" type="Texture" id=22]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/previous_frame.png" type="Texture" id=23]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/play_backwards.png" type="Texture" id=24]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/go_to_last_frame.png" type="Texture" id=25]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/next_frame.png" type="Texture" id=26]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/copy_frame.png" type="Texture" id=27]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/tag.png" type="Texture" id=28]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/onion_skinning_off.png" type="Texture" id=29]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/expandable.png" type="Texture" id=30]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/loop.png" type="Texture" id=31]
[ext_resource path="res://Prefabs/Dialogs/FrameTagDialog.tscn" type="PackedScene" id=42]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Delete_Frame.png" type="Texture" id=43]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Delete_Frame_Hover.png" type="Texture" id=44]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Copy_Frame_Hover.png" type="Texture" id=45]
[ext_resource path="res://Assets/Graphics/Dark Themes/Timeline/Copy_Frame.png" type="Texture" id=46]
[sub_resource type="InputEventKey" id=1]
control = true
@ -257,200 +243,382 @@ margin_bottom = 19.0
rect_min_size = Vector2( 150, 0 )
text = "Current frame: 1/1"
[node name="AddFrame" type="TextureButton" parent="AnimationContainer/TimelineContainer/AnimationButtons" groups=[
[node name="AddFrame" type="Button" parent="AnimationContainer/TimelineContainer/AnimationButtons" groups=[
"UIButtons",
]]
margin_left = 154.0
margin_right = 174.0
margin_bottom = 20.0
rect_min_size = Vector2( 20, 0 )
hint_tooltip = "Add a new frame"
focus_mode = 0
mouse_default_cursor_shape = 2
size_flags_horizontal = 0
size_flags_vertical = 0
texture_normal = ExtResource( 19 )
texture_hover = ExtResource( 20 )
[node name="DeleteFrame" type="TextureButton" parent="AnimationContainer/TimelineContainer/AnimationButtons" groups=[
[node name="TextureRect" type="TextureRect" parent="AnimationContainer/TimelineContainer/AnimationButtons/AddFrame"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -6.0
margin_top = -6.0
margin_right = 6.0
margin_bottom = 6.0
texture = ExtResource( 19 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="DeleteFrame" type="Button" parent="AnimationContainer/TimelineContainer/AnimationButtons" groups=[
"UIButtons",
]]
margin_left = 178.0
margin_right = 198.0
margin_bottom = 20.0
rect_min_size = Vector2( 20, 0 )
hint_tooltip = "Remove Frame"
focus_mode = 0
mouse_default_cursor_shape = 2
size_flags_horizontal = 0
size_flags_vertical = 0
texture_normal = ExtResource( 43 )
texture_hover = ExtResource( 44 )
[node name="CopyFrame" type="TextureButton" parent="AnimationContainer/TimelineContainer/AnimationButtons" groups=[
[node name="TextureRect" type="TextureRect" parent="AnimationContainer/TimelineContainer/AnimationButtons/DeleteFrame"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -6.0
margin_top = -1.0
margin_right = 6.0
margin_bottom = 1.0
size_flags_horizontal = 0
size_flags_vertical = 0
texture = ExtResource( 20 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="CopyFrame" type="Button" parent="AnimationContainer/TimelineContainer/AnimationButtons" groups=[
"UIButtons",
]]
margin_left = 202.0
margin_right = 222.0
margin_bottom = 20.0
rect_min_size = Vector2( 20, 0 )
hint_tooltip = "Clone Frame"
focus_mode = 0
mouse_default_cursor_shape = 2
size_flags_horizontal = 0
size_flags_vertical = 0
texture_normal = ExtResource( 46 )
texture_hover = ExtResource( 45 )
[node name="FrameTagButton" type="TextureButton" parent="AnimationContainer/TimelineContainer/AnimationButtons" groups=[
[node name="TextureRect" type="TextureRect" parent="AnimationContainer/TimelineContainer/AnimationButtons/CopyFrame"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -5.0
margin_top = -6.0
margin_right = 5.0
margin_bottom = 6.0
texture = ExtResource( 27 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="FrameTagButton" type="Button" parent="AnimationContainer/TimelineContainer/AnimationButtons" groups=[
"UIButtons",
]]
margin_left = 226.0
margin_right = 246.0
margin_bottom = 20.0
rect_min_size = Vector2( 20, 0 )
hint_tooltip = "Manage frame tags"
focus_mode = 0
mouse_default_cursor_shape = 2
size_flags_horizontal = 0
size_flags_vertical = 0
texture_normal = ExtResource( 41 )
texture_hover = ExtResource( 40 )
[node name="TextureRect" type="TextureRect" parent="AnimationContainer/TimelineContainer/AnimationButtons/FrameTagButton"]
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
texture = ExtResource( 28 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="PlaybackButtons" type="HBoxContainer" parent="AnimationContainer/TimelineContainer/AnimationButtons"]
margin_left = 287.0
margin_right = 427.0
margin_left = 286.0
margin_right = 426.0
margin_bottom = 24.0
size_flags_horizontal = 6
[node name="FirstFrame" type="TextureButton" parent="AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons" groups=[
[node name="FirstFrame" type="Button" parent="AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons" groups=[
"UIButtons",
]]
margin_right = 20.0
margin_bottom = 24.0
margin_bottom = 20.0
rect_min_size = Vector2( 20, 0 )
hint_tooltip = "FIRSTFRAME_HT"
focus_mode = 0
mouse_default_cursor_shape = 2
size_flags_vertical = 0
shortcut_in_tooltip = false
shortcut = SubResource( 2 )
texture_normal = ExtResource( 21 )
texture_hover = ExtResource( 22 )
[node name="PreviousFrame" type="TextureButton" parent="AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons" groups=[
[node name="TextureRect" type="TextureRect" parent="AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons/FirstFrame"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -5.5
margin_top = -6.0
margin_right = 5.5
margin_bottom = 6.0
texture = ExtResource( 21 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="PreviousFrame" type="Button" parent="AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons" groups=[
"UIButtons",
]]
margin_left = 24.0
margin_right = 44.0
margin_bottom = 24.0
margin_bottom = 20.0
rect_min_size = Vector2( 20, 0 )
hint_tooltip = "PREVIOUSFRAME_HT"
focus_mode = 0
mouse_default_cursor_shape = 2
size_flags_vertical = 0
shortcut_in_tooltip = false
shortcut = SubResource( 4 )
texture_normal = ExtResource( 23 )
texture_hover = ExtResource( 24 )
[node name="PlayBackwards" type="TextureButton" parent="AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons" groups=[
[node name="TextureRect" type="TextureRect" parent="AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons/PreviousFrame"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -5.5
margin_top = -6.0
margin_right = 5.5
margin_bottom = 6.0
texture = ExtResource( 23 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="PlayBackwards" type="Button" parent="AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons" groups=[
"UIButtons",
]]
margin_left = 48.0
margin_right = 68.0
margin_bottom = 24.0
margin_bottom = 20.0
rect_min_size = Vector2( 20, 0 )
hint_tooltip = "PLAYBACKWARDS_HT"
focus_mode = 0
mouse_default_cursor_shape = 2
size_flags_vertical = 0
toggle_mode = true
shortcut_in_tooltip = false
shortcut = SubResource( 6 )
texture_normal = ExtResource( 25 )
texture_pressed = ExtResource( 26 )
texture_hover = ExtResource( 27 )
[node name="PlayForward" type="TextureButton" parent="AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons" groups=[
[node name="TextureRect" type="TextureRect" parent="AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons/PlayBackwards"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -4.0
margin_top = -6.0
margin_right = 3.0
margin_bottom = 6.0
texture = ExtResource( 24 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="PlayForward" type="Button" parent="AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons" groups=[
"UIButtons",
]]
margin_left = 72.0
margin_right = 92.0
margin_bottom = 24.0
margin_bottom = 20.0
rect_min_size = Vector2( 20, 0 )
hint_tooltip = "PLAYFORWARD_HT"
focus_mode = 0
mouse_default_cursor_shape = 2
size_flags_horizontal = 0
size_flags_vertical = 0
toggle_mode = true
shortcut_in_tooltip = false
shortcut = SubResource( 8 )
texture_normal = ExtResource( 28 )
texture_pressed = ExtResource( 26 )
texture_hover = ExtResource( 29 )
[node name="NextFrame" type="TextureButton" parent="AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons" groups=[
[node name="TextureRect" type="TextureRect" parent="AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons/PlayForward"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -3.5
margin_top = -6.0
margin_right = 3.5
margin_bottom = 6.0
texture = ExtResource( 22 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="NextFrame" type="Button" parent="AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons" groups=[
"UIButtons",
]]
margin_left = 96.0
margin_right = 116.0
margin_bottom = 24.0
margin_bottom = 20.0
rect_min_size = Vector2( 20, 0 )
hint_tooltip = "NEXTFRAME_HT"
focus_mode = 0
mouse_default_cursor_shape = 2
size_flags_vertical = 0
shortcut_in_tooltip = false
shortcut = SubResource( 10 )
texture_normal = ExtResource( 30 )
texture_hover = ExtResource( 31 )
[node name="LastFrame" type="TextureButton" parent="AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons" groups=[
[node name="TextureRect" type="TextureRect" parent="AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons/NextFrame"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -5.5
margin_top = -6.0
margin_right = 5.5
margin_bottom = 6.0
texture = ExtResource( 26 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="LastFrame" type="Button" parent="AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons" groups=[
"UIButtons",
]]
margin_left = 120.0
margin_right = 140.0
margin_bottom = 24.0
margin_bottom = 20.0
rect_min_size = Vector2( 20, 0 )
hint_tooltip = "LASTFRAME_HT"
focus_mode = 0
mouse_default_cursor_shape = 2
size_flags_vertical = 0
shortcut_in_tooltip = false
shortcut = SubResource( 12 )
texture_normal = ExtResource( 32 )
texture_hover = ExtResource( 33 )
[node name="TextureRect" type="TextureRect" parent="AnimationContainer/TimelineContainer/AnimationButtons/PlaybackButtons/LastFrame"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -5.5
margin_top = -6.0
margin_right = 5.5
margin_bottom = 6.0
texture = ExtResource( 25 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="LoopButtons" type="HBoxContainer" parent="AnimationContainer/TimelineContainer/AnimationButtons"]
margin_left = 468.0
margin_left = 466.0
margin_right = 604.0
margin_bottom = 24.0
size_flags_horizontal = 0
[node name="OnionSkinningSettings" type="TextureButton" parent="AnimationContainer/TimelineContainer/AnimationButtons/LoopButtons" groups=[
[node name="OnionSkinningSettings" type="Button" parent="AnimationContainer/TimelineContainer/AnimationButtons/LoopButtons" groups=[
"UIButtons",
]]
margin_right = 10.0
margin_bottom = 24.0
margin_right = 12.0
margin_bottom = 20.0
hint_tooltip = "Onion Skinning settings"
focus_mode = 0
mouse_default_cursor_shape = 2
texture_normal = ExtResource( 38 )
texture_hover = ExtResource( 39 )
size_flags_horizontal = 0
size_flags_vertical = 0
[node name="OnionSkinning" type="TextureButton" parent="AnimationContainer/TimelineContainer/AnimationButtons/LoopButtons" groups=[
[node name="TextureRect" type="TextureRect" parent="AnimationContainer/TimelineContainer/AnimationButtons/LoopButtons/OnionSkinningSettings"]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -3.0
margin_top = -6.0
margin_right = 3.0
margin_bottom = 6.0
size_flags_horizontal = 0
size_flags_vertical = 0
texture = ExtResource( 30 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="OnionSkinning" type="Button" parent="AnimationContainer/TimelineContainer/AnimationButtons/LoopButtons" groups=[
"UIButtons",
]]
margin_left = 14.0
margin_right = 34.0
margin_bottom = 24.0
margin_left = 16.0
margin_right = 36.0
margin_bottom = 20.0
rect_min_size = Vector2( 20, 0 )
hint_tooltip = "Enable/disable Onion Skinning"
focus_mode = 0
mouse_default_cursor_shape = 2
texture_normal = ExtResource( 35 )
texture_hover = ExtResource( 36 )
size_flags_vertical = 0
[node name="LoopAnim" type="TextureButton" parent="AnimationContainer/TimelineContainer/AnimationButtons/LoopButtons" groups=[
[node name="TextureRect" type="TextureRect" parent="AnimationContainer/TimelineContainer/AnimationButtons/LoopButtons/OnionSkinning"]
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
size_flags_horizontal = 0
size_flags_vertical = 0
texture = ExtResource( 29 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="LoopAnim" type="Button" parent="AnimationContainer/TimelineContainer/AnimationButtons/LoopButtons" groups=[
"UIButtons",
]]
margin_left = 38.0
margin_right = 58.0
margin_bottom = 24.0
margin_left = 40.0
margin_right = 60.0
margin_bottom = 20.0
rect_min_size = Vector2( 20, 0 )
hint_tooltip = "Cycle loop"
focus_mode = 0
mouse_default_cursor_shape = 2
texture_normal = ExtResource( 37 )
texture_hover = ExtResource( 34 )
size_flags_vertical = 0
[node name="TextureRect" type="TextureRect" parent="AnimationContainer/TimelineContainer/AnimationButtons/LoopButtons/LoopAnim"]
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
texture = ExtResource( 31 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="FPSValue" type="SpinBox" parent="AnimationContainer/TimelineContainer/AnimationButtons/LoopButtons"]
margin_left = 62.0
margin_right = 136.0
margin_left = 64.0
margin_right = 138.0
margin_bottom = 24.0
hint_tooltip = "How many frames per second should the animation preview be?
The more FPS, the faster the animation plays."