mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-03-01 00:43:13 +00:00
Compare commits
1 commit
c9451580d8
...
9cd0ca2d77
Author | SHA1 | Date | |
---|---|---|---|
|
9cd0ca2d77 |
6 changed files with 70 additions and 106 deletions
src
Tools
UI
ExtensionExplorer/Entry
Timeline
|
@ -212,7 +212,8 @@ func update_brush() -> void:
|
||||||
$DensityValueSlider.visible = _brush.type not in IMAGE_BRUSHES
|
$DensityValueSlider.visible = _brush.type not in IMAGE_BRUSHES
|
||||||
$ColorInterpolation.visible = _brush.type in IMAGE_BRUSHES
|
$ColorInterpolation.visible = _brush.type in IMAGE_BRUSHES
|
||||||
$RotationOptions.visible = _brush.type in IMAGE_BRUSHES
|
$RotationOptions.visible = _brush.type in IMAGE_BRUSHES
|
||||||
Global.canvas.indicators.queue_redraw()
|
var canvas_indicators := Global.canvas.indicators
|
||||||
|
canvas_indicators.queue_redraw()
|
||||||
|
|
||||||
|
|
||||||
func update_random_image() -> void:
|
func update_random_image() -> void:
|
||||||
|
@ -377,8 +378,6 @@ func _prepare_tool() -> void:
|
||||||
func _draw_tool(pos: Vector2) -> PackedVector2Array:
|
func _draw_tool(pos: Vector2) -> PackedVector2Array:
|
||||||
if !Global.current_project.layers[Global.current_project.current_layer].can_layer_get_drawn():
|
if !Global.current_project.layers[Global.current_project.current_layer].can_layer_get_drawn():
|
||||||
return PackedVector2Array() # empty fallback
|
return PackedVector2Array() # empty fallback
|
||||||
if Tools.is_placing_tiles():
|
|
||||||
return _compute_draw_tool_pixel(pos)
|
|
||||||
match _brush.type:
|
match _brush.type:
|
||||||
Brushes.PIXEL:
|
Brushes.PIXEL:
|
||||||
return _compute_draw_tool_pixel(pos)
|
return _compute_draw_tool_pixel(pos)
|
||||||
|
@ -429,12 +428,9 @@ func draw_fill_gap(start: Vector2i, end: Vector2i) -> void:
|
||||||
|
|
||||||
## Compute the array of coordinates that should be drawn
|
## Compute the array of coordinates that should be drawn
|
||||||
func _compute_draw_tool_pixel(pos: Vector2) -> PackedVector2Array:
|
func _compute_draw_tool_pixel(pos: Vector2) -> PackedVector2Array:
|
||||||
var brush_size := _brush_size_dynamics
|
|
||||||
if Tools.is_placing_tiles():
|
|
||||||
brush_size = 1
|
|
||||||
var result := PackedVector2Array()
|
var result := PackedVector2Array()
|
||||||
var start := pos - Vector2.ONE * (brush_size >> 1)
|
var start := pos - Vector2.ONE * (_brush_size_dynamics >> 1)
|
||||||
var end := start + Vector2.ONE * brush_size
|
var end := start + Vector2.ONE * _brush_size_dynamics
|
||||||
for y in range(start.y, end.y):
|
for y in range(start.y, end.y):
|
||||||
for x in range(start.x, end.x):
|
for x in range(start.x, end.x):
|
||||||
result.append(Vector2(x, y))
|
result.append(Vector2(x, y))
|
||||||
|
|
|
@ -194,7 +194,7 @@ func _on_ProgressTimer_timeout() -> void:
|
||||||
update_progress()
|
update_progress()
|
||||||
|
|
||||||
|
|
||||||
func _manage_enlarged_thumbnail_close() -> void:
|
func _manage_enlarded_thumbnail_close() -> void:
|
||||||
enlarged_picture.get_parent().hide()
|
enlarged_picture.get_parent().hide()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,6 @@ unique_name_in_owner = true
|
||||||
[node name="Alert" type="AcceptDialog" parent="."]
|
[node name="Alert" type="AcceptDialog" parent="."]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
size = Vector2i(421, 106)
|
size = Vector2i(421, 106)
|
||||||
always_on_top = true
|
|
||||||
|
|
||||||
[node name="Text" type="Label" parent="Alert"]
|
[node name="Text" type="Label" parent="Alert"]
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
|
@ -105,16 +104,15 @@ offset_right = -8.0
|
||||||
offset_bottom = -49.0
|
offset_bottom = -49.0
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="EnlargedThumbnail" type="Window" parent="."]
|
[node name="EnlardedThumbnail" type="Window" parent="."]
|
||||||
title = "Image"
|
title = "Image"
|
||||||
position = Vector2i(0, 36)
|
position = Vector2i(0, 36)
|
||||||
size = Vector2i(440, 360)
|
size = Vector2i(440, 360)
|
||||||
visible = false
|
visible = false
|
||||||
transient = true
|
transient = true
|
||||||
exclusive = true
|
exclusive = true
|
||||||
always_on_top = true
|
|
||||||
|
|
||||||
[node name="Enlarged" type="TextureRect" parent="EnlargedThumbnail"]
|
[node name="Enlarged" type="TextureRect" parent="EnlardedThumbnail"]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
|
@ -133,5 +131,5 @@ stretch_mode = 5
|
||||||
[connection signal="request_completed" from="DownloadRequest" to="." method="_on_DownloadRequest_request_completed"]
|
[connection signal="request_completed" from="DownloadRequest" to="." method="_on_DownloadRequest_request_completed"]
|
||||||
[connection signal="close_requested" from="Alert" to="." method="_manage_alert_close"]
|
[connection signal="close_requested" from="Alert" to="." method="_manage_alert_close"]
|
||||||
[connection signal="focus_exited" from="Alert" to="." method="_manage_alert_close"]
|
[connection signal="focus_exited" from="Alert" to="." method="_manage_alert_close"]
|
||||||
[connection signal="close_requested" from="EnlargedThumbnail" to="." method="_manage_enlarged_thumbnail_close"]
|
[connection signal="close_requested" from="EnlardedThumbnail" to="." method="_manage_enlarded_thumbnail_close"]
|
||||||
[connection signal="focus_exited" from="EnlargedThumbnail" to="." method="_manage_enlarged_thumbnail_close"]
|
[connection signal="focus_exited" from="EnlardedThumbnail" to="." method="_manage_enlarded_thumbnail_close"]
|
||||||
|
|
|
@ -427,20 +427,17 @@ vertical_scroll_mode = 0
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 10
|
size_flags_horizontal = 10
|
||||||
|
|
||||||
[node name="MarginContainer" type="MarginContainer" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools"]
|
[node name="AnimationButtons" type="HBoxContainer" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools"]
|
||||||
layout_mode = 2
|
|
||||||
|
|
||||||
[node name="AnimationButtons" type="HBoxContainer" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer"]
|
|
||||||
custom_minimum_size = Vector2(0, 24)
|
custom_minimum_size = Vector2(0, 24)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
theme_override_constants/separation = 24
|
theme_override_constants/separation = 24
|
||||||
alignment = 2
|
alignment = 2
|
||||||
|
|
||||||
[node name="FrameButtons" type="HBoxContainer" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons"]
|
[node name="FrameButtons" type="HBoxContainer" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="AddFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/FrameButtons" groups=["UIButtons"]]
|
[node name="AddFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons" groups=["UIButtons"]]
|
||||||
custom_minimum_size = Vector2(24, 24)
|
custom_minimum_size = Vector2(24, 24)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 0
|
size_flags_horizontal = 0
|
||||||
|
@ -449,7 +446,7 @@ focus_mode = 0
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
shortcut = SubResource("Shortcut_mvoxm")
|
shortcut = SubResource("Shortcut_mvoxm")
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/FrameButtons/AddFrame"]
|
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/AddFrame"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
|
@ -461,7 +458,7 @@ offset_right = 6.0
|
||||||
offset_bottom = 6.0
|
offset_bottom = 6.0
|
||||||
texture = ExtResource("19")
|
texture = ExtResource("19")
|
||||||
|
|
||||||
[node name="DeleteFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/FrameButtons" groups=["UIButtons"]]
|
[node name="DeleteFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons" groups=["UIButtons"]]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(24, 24)
|
custom_minimum_size = Vector2(24, 24)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
@ -471,7 +468,7 @@ focus_mode = 0
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
shortcut = SubResource("Shortcut_o40ql")
|
shortcut = SubResource("Shortcut_o40ql")
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/FrameButtons/DeleteFrame"]
|
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/DeleteFrame"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
|
@ -485,7 +482,7 @@ size_flags_horizontal = 0
|
||||||
size_flags_vertical = 0
|
size_flags_vertical = 0
|
||||||
texture = ExtResource("20")
|
texture = ExtResource("20")
|
||||||
|
|
||||||
[node name="CopyFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/FrameButtons" groups=["UIButtons"]]
|
[node name="CopyFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons" groups=["UIButtons"]]
|
||||||
custom_minimum_size = Vector2(24, 24)
|
custom_minimum_size = Vector2(24, 24)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 0
|
size_flags_horizontal = 0
|
||||||
|
@ -494,7 +491,7 @@ focus_mode = 0
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
shortcut = SubResource("Shortcut_5g7t7")
|
shortcut = SubResource("Shortcut_5g7t7")
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/FrameButtons/CopyFrame"]
|
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/CopyFrame"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
|
@ -506,7 +503,7 @@ offset_right = 5.0
|
||||||
offset_bottom = 7.0
|
offset_bottom = 7.0
|
||||||
texture = ExtResource("27")
|
texture = ExtResource("27")
|
||||||
|
|
||||||
[node name="MoveFrameLeft" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/FrameButtons" groups=["UIButtons"]]
|
[node name="MoveFrameLeft" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons" groups=["UIButtons"]]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(24, 24)
|
custom_minimum_size = Vector2(24, 24)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
@ -516,7 +513,7 @@ focus_mode = 0
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
shortcut = SubResource("Shortcut_kwn1u")
|
shortcut = SubResource("Shortcut_kwn1u")
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/FrameButtons/MoveFrameLeft"]
|
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/MoveFrameLeft"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
|
@ -529,7 +526,7 @@ offset_bottom = 5.5
|
||||||
texture = ExtResource("8")
|
texture = ExtResource("8")
|
||||||
flip_h = true
|
flip_h = true
|
||||||
|
|
||||||
[node name="MoveFrameRight" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/FrameButtons" groups=["UIButtons"]]
|
[node name="MoveFrameRight" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons" groups=["UIButtons"]]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(24, 24)
|
custom_minimum_size = Vector2(24, 24)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
@ -539,7 +536,7 @@ focus_mode = 0
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
shortcut = SubResource("Shortcut_m2mvi")
|
shortcut = SubResource("Shortcut_m2mvi")
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/FrameButtons/MoveFrameRight"]
|
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/MoveFrameRight"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
|
@ -551,10 +548,10 @@ offset_right = 7.5
|
||||||
offset_bottom = 5.5
|
offset_bottom = 5.5
|
||||||
texture = ExtResource("8")
|
texture = ExtResource("8")
|
||||||
|
|
||||||
[node name="PlaybackButtons" type="HBoxContainer" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons"]
|
[node name="PlaybackButtons" type="HBoxContainer" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="FirstFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
|
[node name="FirstFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
|
||||||
custom_minimum_size = Vector2(24, 24)
|
custom_minimum_size = Vector2(24, 24)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
tooltip_text = "Jump to the first frame"
|
tooltip_text = "Jump to the first frame"
|
||||||
|
@ -562,7 +559,7 @@ focus_mode = 0
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
shortcut = SubResource("4")
|
shortcut = SubResource("4")
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/PlaybackButtons/FirstFrame"]
|
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/FirstFrame"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
|
@ -574,7 +571,7 @@ offset_right = 5.5
|
||||||
offset_bottom = 6.0
|
offset_bottom = 6.0
|
||||||
texture = ExtResource("21")
|
texture = ExtResource("21")
|
||||||
|
|
||||||
[node name="PreviousFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
|
[node name="PreviousFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
|
||||||
custom_minimum_size = Vector2(24, 24)
|
custom_minimum_size = Vector2(24, 24)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
tooltip_text = "Go to the previous frame"
|
tooltip_text = "Go to the previous frame"
|
||||||
|
@ -582,7 +579,7 @@ focus_mode = 0
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
shortcut = SubResource("6")
|
shortcut = SubResource("6")
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/PlaybackButtons/PreviousFrame"]
|
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/PreviousFrame"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
|
@ -594,7 +591,7 @@ offset_right = 5.5
|
||||||
offset_bottom = 6.0
|
offset_bottom = 6.0
|
||||||
texture = ExtResource("23")
|
texture = ExtResource("23")
|
||||||
|
|
||||||
[node name="PlayBackwards" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
|
[node name="PlayBackwards" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(24, 24)
|
custom_minimum_size = Vector2(24, 24)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
@ -604,7 +601,7 @@ mouse_default_cursor_shape = 2
|
||||||
toggle_mode = true
|
toggle_mode = true
|
||||||
shortcut = SubResource("8")
|
shortcut = SubResource("8")
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/PlaybackButtons/PlayBackwards"]
|
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/PlayBackwards"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
|
@ -616,7 +613,7 @@ offset_right = 3.0
|
||||||
offset_bottom = 6.0
|
offset_bottom = 6.0
|
||||||
texture = ExtResource("24")
|
texture = ExtResource("24")
|
||||||
|
|
||||||
[node name="PlayForward" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
|
[node name="PlayForward" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(24, 24)
|
custom_minimum_size = Vector2(24, 24)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
@ -627,7 +624,7 @@ mouse_default_cursor_shape = 2
|
||||||
toggle_mode = true
|
toggle_mode = true
|
||||||
shortcut = SubResource("10")
|
shortcut = SubResource("10")
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/PlaybackButtons/PlayForward"]
|
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/PlayForward"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
|
@ -639,7 +636,7 @@ offset_right = 3.5
|
||||||
offset_bottom = 6.0
|
offset_bottom = 6.0
|
||||||
texture = ExtResource("22")
|
texture = ExtResource("22")
|
||||||
|
|
||||||
[node name="NextFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
|
[node name="NextFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
|
||||||
custom_minimum_size = Vector2(24, 24)
|
custom_minimum_size = Vector2(24, 24)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
tooltip_text = "Go to the next frame"
|
tooltip_text = "Go to the next frame"
|
||||||
|
@ -647,7 +644,7 @@ focus_mode = 0
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
shortcut = SubResource("12")
|
shortcut = SubResource("12")
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/PlaybackButtons/NextFrame"]
|
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/NextFrame"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
|
@ -659,7 +656,7 @@ offset_right = 5.5
|
||||||
offset_bottom = 6.0
|
offset_bottom = 6.0
|
||||||
texture = ExtResource("26")
|
texture = ExtResource("26")
|
||||||
|
|
||||||
[node name="LastFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
|
[node name="LastFrame" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons" groups=["UIButtons"]]
|
||||||
custom_minimum_size = Vector2(24, 24)
|
custom_minimum_size = Vector2(24, 24)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
tooltip_text = "Jump to the last frame"
|
tooltip_text = "Jump to the last frame"
|
||||||
|
@ -667,7 +664,7 @@ focus_mode = 0
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
shortcut = SubResource("14")
|
shortcut = SubResource("14")
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/PlaybackButtons/LastFrame"]
|
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/LastFrame"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
|
@ -679,10 +676,10 @@ offset_right = 5.5
|
||||||
offset_bottom = 6.0
|
offset_bottom = 6.0
|
||||||
texture = ExtResource("25")
|
texture = ExtResource("25")
|
||||||
|
|
||||||
[node name="LoopButtons" type="HBoxContainer" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons"]
|
[node name="LoopButtons" type="HBoxContainer" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="TimelineSettingsButton" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/LoopButtons" groups=["UIButtons"]]
|
[node name="TimelineSettingsButton" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons" groups=["UIButtons"]]
|
||||||
custom_minimum_size = Vector2(24, 24)
|
custom_minimum_size = Vector2(24, 24)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 0
|
size_flags_horizontal = 0
|
||||||
|
@ -691,7 +688,7 @@ focus_mode = 0
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
shortcut = SubResource("Shortcut_tke6v")
|
shortcut = SubResource("Shortcut_tke6v")
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/LoopButtons/TimelineSettingsButton"]
|
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons/TimelineSettingsButton"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
|
@ -705,7 +702,7 @@ size_flags_horizontal = 0
|
||||||
size_flags_vertical = 0
|
size_flags_vertical = 0
|
||||||
texture = ExtResource("30")
|
texture = ExtResource("30")
|
||||||
|
|
||||||
[node name="OnionSkinning" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/LoopButtons" groups=["UIButtons"]]
|
[node name="OnionSkinning" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons" groups=["UIButtons"]]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(24, 24)
|
custom_minimum_size = Vector2(24, 24)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
@ -714,7 +711,7 @@ focus_mode = 0
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
shortcut = SubResource("Shortcut_pouu1")
|
shortcut = SubResource("Shortcut_pouu1")
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/LoopButtons/OnionSkinning"]
|
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons/OnionSkinning"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
|
@ -728,7 +725,7 @@ size_flags_horizontal = 0
|
||||||
size_flags_vertical = 0
|
size_flags_vertical = 0
|
||||||
texture = ExtResource("29")
|
texture = ExtResource("29")
|
||||||
|
|
||||||
[node name="LoopAnim" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/LoopButtons" groups=["UIButtons"]]
|
[node name="LoopAnim" type="Button" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons" groups=["UIButtons"]]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(24, 24)
|
custom_minimum_size = Vector2(24, 24)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
@ -737,7 +734,7 @@ focus_mode = 0
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
shortcut = SubResource("Shortcut_1onr8")
|
shortcut = SubResource("Shortcut_1onr8")
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/LoopButtons/LoopAnim"]
|
[node name="TextureRect" type="TextureRect" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons/LoopAnim"]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
|
@ -749,7 +746,7 @@ offset_right = 7.0
|
||||||
offset_bottom = 7.0
|
offset_bottom = 7.0
|
||||||
texture = ExtResource("31")
|
texture = ExtResource("31")
|
||||||
|
|
||||||
[node name="FPSValue" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/LoopButtons" instance=ExtResource("9")]
|
[node name="FPSValue" parent="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons" instance=ExtResource("9")]
|
||||||
unique_name_in_owner = true
|
unique_name_in_owner = true
|
||||||
custom_minimum_size = Vector2(72, 24)
|
custom_minimum_size = Vector2(72, 24)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
@ -1142,21 +1139,21 @@ color = Color(0, 0.741176, 1, 0.501961)
|
||||||
[connection signal="pressed" from="TimelineContainer/TimelineButtons/LayerTools/MarginContainer/LayerSettingsContainer/LayerButtons/MergeDownLayer" to="." method="_on_MergeDownLayer_pressed"]
|
[connection signal="pressed" from="TimelineContainer/TimelineButtons/LayerTools/MarginContainer/LayerSettingsContainer/LayerButtons/MergeDownLayer" to="." method="_on_MergeDownLayer_pressed"]
|
||||||
[connection signal="pressed" from="TimelineContainer/TimelineButtons/LayerTools/MarginContainer/LayerSettingsContainer/LayerButtons/LayerFX" to="." method="_on_layer_fx_pressed"]
|
[connection signal="pressed" from="TimelineContainer/TimelineButtons/LayerTools/MarginContainer/LayerSettingsContainer/LayerButtons/LayerFX" to="." method="_on_layer_fx_pressed"]
|
||||||
[connection signal="item_selected" from="TimelineContainer/TimelineButtons/LayerTools/MarginContainer/LayerSettingsContainer/BlendContainer/BlendModes" to="." method="_on_blend_modes_item_selected"]
|
[connection signal="item_selected" from="TimelineContainer/TimelineButtons/LayerTools/MarginContainer/LayerSettingsContainer/BlendContainer/BlendModes" to="." method="_on_blend_modes_item_selected"]
|
||||||
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/FrameButtons/AddFrame" to="." method="add_frame"]
|
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/AddFrame" to="." method="add_frame"]
|
||||||
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/FrameButtons/DeleteFrame" to="." method="_on_DeleteFrame_pressed"]
|
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/DeleteFrame" to="." method="_on_DeleteFrame_pressed"]
|
||||||
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/FrameButtons/CopyFrame" to="." method="_on_CopyFrame_pressed"]
|
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/CopyFrame" to="." method="_on_CopyFrame_pressed"]
|
||||||
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/FrameButtons/MoveFrameLeft" to="." method="_on_MoveLeft_pressed"]
|
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/MoveFrameLeft" to="." method="_on_MoveLeft_pressed"]
|
||||||
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/FrameButtons/MoveFrameRight" to="." method="_on_MoveRight_pressed"]
|
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/FrameButtons/MoveFrameRight" to="." method="_on_MoveRight_pressed"]
|
||||||
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/PlaybackButtons/FirstFrame" to="." method="_on_FirstFrame_pressed"]
|
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/FirstFrame" to="." method="_on_FirstFrame_pressed"]
|
||||||
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/PlaybackButtons/PreviousFrame" to="." method="_on_PreviousFrame_pressed"]
|
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/PreviousFrame" to="." method="_on_PreviousFrame_pressed"]
|
||||||
[connection signal="toggled" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/PlaybackButtons/PlayBackwards" to="." method="_on_PlayBackwards_toggled"]
|
[connection signal="toggled" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/PlayBackwards" to="." method="_on_PlayBackwards_toggled"]
|
||||||
[connection signal="toggled" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/PlaybackButtons/PlayForward" to="." method="_on_PlayForward_toggled"]
|
[connection signal="toggled" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/PlayForward" to="." method="_on_PlayForward_toggled"]
|
||||||
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/PlaybackButtons/NextFrame" to="." method="_on_NextFrame_pressed"]
|
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/NextFrame" to="." method="_on_NextFrame_pressed"]
|
||||||
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/PlaybackButtons/LastFrame" to="." method="_on_LastFrame_pressed"]
|
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/PlaybackButtons/LastFrame" to="." method="_on_LastFrame_pressed"]
|
||||||
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/LoopButtons/TimelineSettingsButton" to="." method="_on_timeline_settings_button_pressed"]
|
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons/TimelineSettingsButton" to="." method="_on_timeline_settings_button_pressed"]
|
||||||
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/LoopButtons/OnionSkinning" to="." method="_on_OnionSkinning_pressed"]
|
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons/OnionSkinning" to="." method="_on_OnionSkinning_pressed"]
|
||||||
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/LoopButtons/LoopAnim" to="." method="_on_LoopAnim_pressed"]
|
[connection signal="pressed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons/LoopAnim" to="." method="_on_LoopAnim_pressed"]
|
||||||
[connection signal="value_changed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/MarginContainer/AnimationButtons/LoopButtons/FPSValue" to="." method="_on_FPSValue_value_changed"]
|
[connection signal="value_changed" from="TimelineContainer/TimelineButtons/VBoxContainer/AnimationToolsScrollContainer/AnimationTools/AnimationButtons/LoopButtons/FPSValue" to="." method="_on_FPSValue_value_changed"]
|
||||||
[connection signal="dragged" from="TimelineContainer/MainBodyPanel/MainBodyVBoxContainer/MarginContainer/LayerFrameHeaderHSplit" to="." method="_on_layer_frame_h_split_dragged"]
|
[connection signal="dragged" from="TimelineContainer/MainBodyPanel/MainBodyVBoxContainer/MarginContainer/LayerFrameHeaderHSplit" to="." method="_on_layer_frame_h_split_dragged"]
|
||||||
[connection signal="gui_input" from="TimelineContainer/MainBodyPanel/MainBodyVBoxContainer/MarginContainer/LayerFrameHeaderHSplit" to="." method="_on_LayerFrameSplitContainer_gui_input"]
|
[connection signal="gui_input" from="TimelineContainer/MainBodyPanel/MainBodyVBoxContainer/MarginContainer/LayerFrameHeaderHSplit" to="." method="_on_LayerFrameSplitContainer_gui_input"]
|
||||||
[connection signal="pressed" from="TimelineContainer/MainBodyPanel/MainBodyVBoxContainer/MarginContainer/LayerFrameHeaderHSplit/LayerHeaderContainer/GlobalVisibilityButton" to="." method="_on_global_visibility_button_pressed"]
|
[connection signal="pressed" from="TimelineContainer/MainBodyPanel/MainBodyVBoxContainer/MarginContainer/LayerFrameHeaderHSplit/LayerHeaderContainer/GlobalVisibilityButton" to="." method="_on_global_visibility_button_pressed"]
|
||||||
|
|
|
@ -9,7 +9,7 @@ var cel: BaseCel
|
||||||
var _is_guide_stylebox := false
|
var _is_guide_stylebox := false
|
||||||
|
|
||||||
@onready var popup_menu: PopupMenu = get_node_or_null("PopupMenu")
|
@onready var popup_menu: PopupMenu = get_node_or_null("PopupMenu")
|
||||||
@onready var linked_rect: ColorRect = $Linked
|
@onready var linked: ColorRect = $Linked
|
||||||
@onready var cel_texture: TextureRect = $CelTexture
|
@onready var cel_texture: TextureRect = $CelTexture
|
||||||
@onready var transparent_checker: ColorRect = $CelTexture/TransparentChecker
|
@onready var transparent_checker: ColorRect = $CelTexture/TransparentChecker
|
||||||
@onready var properties: AcceptDialog = Global.control.find_child("CelProperties")
|
@onready var properties: AcceptDialog = Global.control.find_child("CelProperties")
|
||||||
|
@ -35,7 +35,6 @@ func _ready() -> void:
|
||||||
popup_menu.add_item("Play audio here")
|
popup_menu.add_item("Play audio here")
|
||||||
_is_playing_audio()
|
_is_playing_audio()
|
||||||
Global.cel_switched.connect(_is_playing_audio)
|
Global.cel_switched.connect(_is_playing_audio)
|
||||||
Themes.theme_switched.connect(_is_playing_audio)
|
|
||||||
Global.current_project.fps_changed.connect(_is_playing_audio)
|
Global.current_project.fps_changed.connect(_is_playing_audio)
|
||||||
Global.current_project.layers[layer].audio_changed.connect(_is_playing_audio)
|
Global.current_project.layers[layer].audio_changed.connect(_is_playing_audio)
|
||||||
Global.current_project.layers[layer].playback_frame_changed.connect(_is_playing_audio)
|
Global.current_project.layers[layer].playback_frame_changed.connect(_is_playing_audio)
|
||||||
|
@ -76,10 +75,10 @@ func button_setup() -> void:
|
||||||
tooltip_text = tr("Frame: %s, Layer: %s") % [frame + 1, base_layer.name]
|
tooltip_text = tr("Frame: %s, Layer: %s") % [frame + 1, base_layer.name]
|
||||||
if cel is not AudioCel:
|
if cel is not AudioCel:
|
||||||
cel_texture.texture = cel.image_texture
|
cel_texture.texture = cel.image_texture
|
||||||
if is_instance_valid(linked_rect):
|
if is_instance_valid(linked):
|
||||||
linked_rect.visible = cel.link_set != null
|
linked.visible = cel.link_set != null
|
||||||
if cel.link_set != null:
|
if cel.link_set != null:
|
||||||
linked_rect.color.h = cel.link_set["hue"]
|
linked.color.h = cel.link_set["hue"]
|
||||||
|
|
||||||
|
|
||||||
func _on_CelButton_pressed() -> void:
|
func _on_CelButton_pressed() -> void:
|
||||||
|
@ -412,26 +411,13 @@ func _sort_cel_indices_by_frame(a: Array, b: Array) -> bool:
|
||||||
|
|
||||||
|
|
||||||
func _is_playing_audio() -> void:
|
func _is_playing_audio() -> void:
|
||||||
var project := Global.current_project
|
var frame_class := Global.current_project.frames[frame]
|
||||||
var frame_class := project.frames[frame]
|
var layer_class := Global.current_project.layers[layer] as AudioLayer
|
||||||
var layer_class := project.layers[layer] as AudioLayer
|
|
||||||
var audio_length := layer_class.get_audio_length()
|
var audio_length := layer_class.get_audio_length()
|
||||||
var frame_pos := frame_class.position_in_seconds(project, layer_class.playback_frame)
|
var frame_pos := frame_class.position_in_seconds(
|
||||||
var audio_color := Color.LIGHT_GRAY
|
Global.current_project, layer_class.playback_frame
|
||||||
var pressed_stylebox := Global.control.theme.get_stylebox(&"pressed", &"CelButton")
|
|
||||||
if pressed_stylebox is StyleBoxFlat:
|
|
||||||
audio_color = pressed_stylebox.border_color
|
|
||||||
var is_last_frame := frame + 1 >= project.frames.size()
|
|
||||||
if not is_last_frame:
|
|
||||||
is_last_frame = (
|
|
||||||
project.frames[frame + 1].position_in_seconds(project, layer_class.playback_frame)
|
|
||||||
>= audio_length
|
|
||||||
)
|
)
|
||||||
if frame_pos == 0 or (is_last_frame and frame_pos < audio_length):
|
if frame_pos >= 0 and frame_pos < audio_length:
|
||||||
cel_texture.texture = preload("res://assets/graphics/misc/musical_note.png")
|
cel_texture.texture = preload("res://assets/graphics/misc/musical_note.png")
|
||||||
cel_texture.self_modulate = audio_color
|
|
||||||
linked_rect.visible = false
|
|
||||||
else:
|
else:
|
||||||
linked_rect.visible = frame_pos < audio_length and frame_pos > 0
|
|
||||||
linked_rect.color = audio_color
|
|
||||||
cel_texture.texture = null
|
cel_texture.texture = null
|
||||||
|
|
|
@ -15,7 +15,6 @@ var button_pressed := false:
|
||||||
get:
|
get:
|
||||||
return main_button.button_pressed
|
return main_button.button_pressed
|
||||||
var animation_running := false
|
var animation_running := false
|
||||||
var audio_playing_at_frame := 0
|
|
||||||
|
|
||||||
var audio_player: AudioStreamPlayer
|
var audio_player: AudioStreamPlayer
|
||||||
@onready var properties: AcceptDialog = Global.control.find_child("LayerProperties")
|
@onready var properties: AcceptDialog = Global.control.find_child("LayerProperties")
|
||||||
|
@ -37,7 +36,7 @@ func _ready() -> void:
|
||||||
Global.cel_switched.connect(_on_cel_switched)
|
Global.cel_switched.connect(_on_cel_switched)
|
||||||
var layer := Global.current_project.layers[layer_index]
|
var layer := Global.current_project.layers[layer_index]
|
||||||
layer.name_changed.connect(func(): label.text = layer.name)
|
layer.name_changed.connect(func(): label.text = layer.name)
|
||||||
layer.visibility_changed.connect(_on_layer_visibility_changed)
|
layer.visibility_changed.connect(update_buttons)
|
||||||
if layer is PixelLayer:
|
if layer is PixelLayer:
|
||||||
linked_button.visible = true
|
linked_button.visible = true
|
||||||
elif layer is GroupLayer:
|
elif layer is GroupLayer:
|
||||||
|
@ -69,8 +68,7 @@ func _ready() -> void:
|
||||||
|
|
||||||
func _on_cel_switched() -> void:
|
func _on_cel_switched() -> void:
|
||||||
z_index = 1 if button_pressed else 0
|
z_index = 1 if button_pressed else 0
|
||||||
var project := Global.current_project
|
var layer := Global.current_project.layers[layer_index]
|
||||||
var layer := project.layers[layer_index]
|
|
||||||
if layer is AudioLayer:
|
if layer is AudioLayer:
|
||||||
if not is_instance_valid(audio_player):
|
if not is_instance_valid(audio_player):
|
||||||
return
|
return
|
||||||
|
@ -78,26 +76,16 @@ func _on_cel_switched() -> void:
|
||||||
audio_player.stop()
|
audio_player.stop()
|
||||||
return
|
return
|
||||||
if animation_running:
|
if animation_running:
|
||||||
var current_frame := project.current_frame
|
var current_frame := Global.current_project.current_frame
|
||||||
if (
|
if (
|
||||||
current_frame == layer.playback_frame
|
current_frame == layer.playback_frame
|
||||||
or (current_frame == 0 and layer.playback_frame < 0)
|
or (current_frame == 0 and layer.playback_frame < 0)
|
||||||
## True when switching cels while the animation is running
|
|
||||||
or current_frame != audio_playing_at_frame + 1
|
|
||||||
):
|
):
|
||||||
_play_audio(false)
|
_play_audio(false)
|
||||||
audio_playing_at_frame = current_frame
|
|
||||||
else:
|
else:
|
||||||
_play_audio(true)
|
_play_audio(true)
|
||||||
|
|
||||||
|
|
||||||
func _on_layer_visibility_changed() -> void:
|
|
||||||
update_buttons()
|
|
||||||
var layer := Global.current_project.layers[layer_index]
|
|
||||||
if layer is AudioLayer:
|
|
||||||
_play_audio(not animation_running)
|
|
||||||
|
|
||||||
|
|
||||||
func _on_animation_started(_dir: bool) -> void:
|
func _on_animation_started(_dir: bool) -> void:
|
||||||
animation_running = true
|
animation_running = true
|
||||||
_play_audio(false)
|
_play_audio(false)
|
||||||
|
@ -129,7 +117,6 @@ func _play_audio(single_frame: bool) -> void:
|
||||||
var frame_pos := frame.position_in_seconds(project, layer.playback_frame)
|
var frame_pos := frame.position_in_seconds(project, layer.playback_frame)
|
||||||
if frame_pos >= 0 and frame_pos < audio_length:
|
if frame_pos >= 0 and frame_pos < audio_length:
|
||||||
audio_player.play(frame_pos)
|
audio_player.play(frame_pos)
|
||||||
audio_playing_at_frame = project.current_frame
|
|
||||||
if single_frame:
|
if single_frame:
|
||||||
var timer := get_tree().create_timer(frame.get_duration_in_seconds(project.fps))
|
var timer := get_tree().create_timer(frame.get_duration_in_seconds(project.fps))
|
||||||
timer.timeout.connect(func(): audio_player.stop())
|
timer.timeout.connect(func(): audio_player.stop())
|
||||||
|
|
Loading…
Add table
Reference in a new issue