mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-21 21:13:14 +00:00
Lazy load the frame tag dialog
This commit is contained in:
parent
8bfd474613
commit
ebfc3c04fe
2 changed files with 9 additions and 5 deletions
|
@ -5,6 +5,7 @@ signal animation_finished
|
||||||
|
|
||||||
const FRAME_BUTTON_TSCN := preload("res://src/UI/Timeline/FrameButton.tscn")
|
const FRAME_BUTTON_TSCN := preload("res://src/UI/Timeline/FrameButton.tscn")
|
||||||
const LAYER_FX_SCENE_PATH := "res://src/UI/Timeline/LayerEffects/LayerEffectsSettings.tscn"
|
const LAYER_FX_SCENE_PATH := "res://src/UI/Timeline/LayerEffects/LayerEffectsSettings.tscn"
|
||||||
|
const FRAME_TAG_DIALOG_SCENE_PATH := "res://src/UI/Timeline/FrameTagDialog.tscn"
|
||||||
|
|
||||||
var is_animation_running := false
|
var is_animation_running := false
|
||||||
var animation_loop := 1 ## 0 is no loop, 1 is cycle loop, 2 is ping-pong loop
|
var animation_loop := 1 ## 0 is no loop, 1 is cycle loop, 2 is ping-pong loop
|
||||||
|
@ -24,6 +25,12 @@ var layer_effect_settings: AcceptDialog:
|
||||||
layer_effect_settings = load(LAYER_FX_SCENE_PATH).instantiate()
|
layer_effect_settings = load(LAYER_FX_SCENE_PATH).instantiate()
|
||||||
add_child(layer_effect_settings)
|
add_child(layer_effect_settings)
|
||||||
return layer_effect_settings
|
return layer_effect_settings
|
||||||
|
var frame_tag_dialog: AcceptDialog:
|
||||||
|
get:
|
||||||
|
if not is_instance_valid(frame_tag_dialog):
|
||||||
|
frame_tag_dialog = load(FRAME_TAG_DIALOG_SCENE_PATH).instantiate()
|
||||||
|
add_child(frame_tag_dialog)
|
||||||
|
return frame_tag_dialog
|
||||||
|
|
||||||
@onready var old_scroll := 0 ## The previous scroll state of $ScrollContainer
|
@onready var old_scroll := 0 ## The previous scroll state of $ScrollContainer
|
||||||
@onready var tag_spacer := %TagSpacer as Control
|
@onready var tag_spacer := %TagSpacer as Control
|
||||||
|
@ -481,7 +488,7 @@ func copy_frames(
|
||||||
|
|
||||||
|
|
||||||
func _on_FrameTagButton_pressed() -> void:
|
func _on_FrameTagButton_pressed() -> void:
|
||||||
find_child("FrameTagDialog").popup_centered()
|
frame_tag_dialog.popup_centered()
|
||||||
|
|
||||||
|
|
||||||
func _on_MoveLeft_pressed() -> void:
|
func _on_MoveLeft_pressed() -> void:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=77 format=3 uid="uid://dbr6mulku2qju"]
|
[gd_scene load_steps=76 format=3 uid="uid://dbr6mulku2qju"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://src/UI/Timeline/AnimationTimeline.gd" id="1"]
|
[ext_resource type="Script" path="res://src/UI/Timeline/AnimationTimeline.gd" id="1"]
|
||||||
[ext_resource type="Texture2D" uid="uid://d36mlbmq06q4e" path="res://assets/graphics/layers/new.png" id="2"]
|
[ext_resource type="Texture2D" uid="uid://d36mlbmq06q4e" path="res://assets/graphics/layers/new.png" id="2"]
|
||||||
|
@ -26,7 +26,6 @@
|
||||||
[ext_resource type="Texture2D" uid="uid://dukip7mvotxsp" path="res://assets/graphics/timeline/onion_skinning_off.png" id="29"]
|
[ext_resource type="Texture2D" uid="uid://dukip7mvotxsp" path="res://assets/graphics/timeline/onion_skinning_off.png" id="29"]
|
||||||
[ext_resource type="Texture2D" uid="uid://dinubfua8gqhw" path="res://assets/graphics/timeline/expandable.png" id="30"]
|
[ext_resource type="Texture2D" uid="uid://dinubfua8gqhw" path="res://assets/graphics/timeline/expandable.png" id="30"]
|
||||||
[ext_resource type="Texture2D" uid="uid://fbwld5ofmocm" path="res://assets/graphics/timeline/loop.png" id="31"]
|
[ext_resource type="Texture2D" uid="uid://fbwld5ofmocm" path="res://assets/graphics/timeline/loop.png" id="31"]
|
||||||
[ext_resource type="PackedScene" uid="uid://c6je8lgr850wf" path="res://src/UI/Timeline/FrameTagDialog.tscn" id="42"]
|
|
||||||
|
|
||||||
[sub_resource type="InputEventAction" id="InputEventAction_r3l7p"]
|
[sub_resource type="InputEventAction" id="InputEventAction_r3l7p"]
|
||||||
action = &"new_layer"
|
action = &"new_layer"
|
||||||
|
@ -982,8 +981,6 @@ popup/item_0/id = 0
|
||||||
popup/item_1/text = "Below canvas"
|
popup/item_1/text = "Below canvas"
|
||||||
popup/item_1/id = 1
|
popup/item_1/id = 1
|
||||||
|
|
||||||
[node name="FrameTagDialog" parent="." instance=ExtResource("42")]
|
|
||||||
|
|
||||||
[node name="DragHighlight" type="ColorRect" parent="."]
|
[node name="DragHighlight" type="ColorRect" parent="."]
|
||||||
visible = false
|
visible = false
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue