mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-30 23:19:49 +00:00
Change AnimationTagUI to be a Control instead of a VBoxContainer
This commit is contained in:
parent
592260ef93
commit
ecb1890024
|
@ -487,7 +487,7 @@ func _animation_tags_changed(value: Array[AnimationTag]) -> void:
|
|||
child.queue_free()
|
||||
|
||||
for tag in animation_tags:
|
||||
var tag_c: Container = animation_tag_node.instantiate()
|
||||
var tag_c := animation_tag_node.instantiate()
|
||||
tag_c.tag = tag
|
||||
Global.tag_container.add_child(tag_c)
|
||||
var tag_position := Global.tag_container.get_child_count() - 1
|
||||
|
@ -506,7 +506,7 @@ func _set_timeline_first_and_last_frames() -> void:
|
|||
for tag in animation_tags:
|
||||
if current_frame + 1 >= tag.from && current_frame + 1 <= tag.to:
|
||||
Global.animation_timeline.first_frame = tag.from - 1
|
||||
Global.animation_timeline.last_frame = min(frames.size() - 1, tag.to - 1)
|
||||
Global.animation_timeline.last_frame = mini(frames.size() - 1, tag.to - 1)
|
||||
|
||||
|
||||
func is_empty() -> bool:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
extends VBoxContainer
|
||||
extends Control
|
||||
|
||||
var tag: AnimationTag
|
||||
@onready var tag_properties := Global.control.find_child("TagProperties") as ConfirmationDialog
|
||||
|
|
|
@ -2,10 +2,13 @@
|
|||
|
||||
[ext_resource type="Script" path="res://src/UI/Timeline/AnimationTagUI.gd" id="1"]
|
||||
|
||||
[node name="AnimationTagUI" type="VBoxContainer"]
|
||||
[node name="AnimationTagUI" type="Control"]
|
||||
custom_minimum_size = Vector2(39, 32)
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_right = 39.0
|
||||
offset_bottom = 32.0
|
||||
mouse_filter = 2
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="Line2D" type="Line2D" parent="."]
|
||||
|
@ -16,7 +19,18 @@ begin_cap_mode = 2
|
|||
end_cap_mode = 2
|
||||
|
||||
[node name="Button" type="Button" parent="."]
|
||||
layout_mode = 2
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -18.5
|
||||
offset_top = -16.0
|
||||
offset_right = 18.5
|
||||
offset_bottom = 16.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 3
|
||||
auto_translate = false
|
||||
|
|
Loading…
Reference in a new issue