1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-19 01:29:49 +00:00
Pixelorama/src/Main.tscn
Emmanouil Papadeas b620cf2a9e Lazy load the preferences dialog
Speeds up the initial loading time of Pixelorama. It's now almost as fast as 0.x on my computer (a bit more than 2 seconds). Lazy loading the preferences dialog also drastically reduces memory usage and node count (when preferences have not been opened), from 150MB, 13634 objects and 3680 nodes, to 94MB, 8207 objects and 1823 nodes. This essentially cuts the initial node count to half!
2024-03-24 02:46:57 +02:00

114 lines
5.6 KiB
Plaintext

[gd_scene load_steps=15 format=3 uid="uid://dbylw5k04ulp8"]
[ext_resource type="Theme" uid="uid://cngbvfpwjoimv" path="res://assets/themes/dark/theme.tres" id="1"]
[ext_resource type="Script" path="res://src/Main.gd" id="2"]
[ext_resource type="PackedScene" uid="uid://bsgwar3l6qtgv" path="res://src/UI/TopMenuContainer/TopMenuContainer.tscn" id="3"]
[ext_resource type="PackedScene" uid="uid://c8dsi6ggkqa7a" path="res://src/UI/UI.tscn" id="4"]
[ext_resource type="PackedScene" uid="uid://d1jyt8wleg8ft" path="res://src/UI/Buttons/PatternsPopup.tscn" id="5"]
[ext_resource type="PackedScene" uid="uid://c5x85ysdouh4t" path="res://src/UI/Buttons/BrushesPopup.tscn" id="6"]
[ext_resource type="PackedScene" uid="uid://cltlo2whtiejd" path="res://src/UI/Dialogs/SaveSpriteHTML5.tscn" id="8"]
[ext_resource type="PackedScene" uid="uid://bs3dnnvnxyp68" path="res://src/UI/Timeline/FrameProperties.tscn" id="9"]
[ext_resource type="PackedScene" uid="uid://d4euwo633u33b" path="res://src/UI/Dialogs/SaveSprite.tscn" id="11"]
[ext_resource type="PackedScene" uid="uid://b3aeqj2k58wdk" path="res://src/UI/Dialogs/OpenSprite.tscn" id="12"]
[ext_resource type="PackedScene" uid="uid://c0nuukjakmai2" path="res://src/UI/Dialogs/TileModeOffsetsDialog.tscn" id="14"]
[ext_resource type="Script" path="res://src/HandleExtensions.gd" id="15_v0k2h"]
[ext_resource type="PackedScene" uid="uid://clbjfkdupw52l" path="res://src/UI/Timeline/CelProperties.tscn" id="17_ucs64"]
[ext_resource type="PackedScene" uid="uid://clgu8wb5o6oup" path="res://src/UI/Dialogs/ExportDialog.tscn" id="39"]
[node name="Control" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1")
script = ExtResource("2")
[node name="MenuAndUI" type="VBoxContainer" parent="."]
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
theme_override_constants/separation = 0
[node name="TopMenuContainer" parent="MenuAndUI" instance=ExtResource("3")]
layout_mode = 2
[node name="UI" parent="MenuAndUI" instance=ExtResource("4")]
layout_mode = 2
[node name="Dialogs" type="Control" parent="."]
anchors_preset = 0
mouse_filter = 2
[node name="BrushesPopup" parent="Dialogs" instance=ExtResource("6")]
[node name="PatternsPopup" parent="Dialogs" instance=ExtResource("5")]
[node name="OpenSprite" parent="Dialogs" instance=ExtResource("12")]
[node name="SaveSprite" parent="Dialogs" instance=ExtResource("11")]
[node name="SaveSpriteHTML5" parent="Dialogs" instance=ExtResource("8")]
[node name="ExportDialog" parent="Dialogs" instance=ExtResource("39")]
[node name="UnsavedCanvasDialog" type="ConfirmationDialog" parent="Dialogs"]
title = "Unsaved Image"
exclusive = false
popup_window = true
dialog_text = "You have unsaved changes. If you proceed, the progress you have made will be lost."
[node name="QuitDialog" type="ConfirmationDialog" parent="Dialogs"]
exclusive = false
popup_window = true
dialog_text = "Are you sure you want to exit Pixelorama?"
[node name="QuitAndSaveDialog" type="ConfirmationDialog" parent="Dialogs"]
title = "Save before exiting?"
ok_button_text = "Save & Exit"
dialog_text = "Project %s has unsaved progress. How do you wish to proceed?"
[node name="ErrorDialog" type="AcceptDialog" parent="Dialogs"]
exclusive = false
popup_window = true
dialog_text = "This is an error message!"
[node name="BackupConfirmation" type="ConfirmationDialog" parent="Dialogs"]
popup_window = true
dialog_text = "Autosaved project(s) from a crashed session were found.
Do you want to recover the data?"
dialog_autowrap = true
[node name="CelProperties" parent="Dialogs" instance=ExtResource("17_ucs64")]
[node name="FrameProperties" parent="Dialogs" instance=ExtResource("9")]
[node name="TileModeOffsetsDialog" parent="Dialogs" instance=ExtResource("14")]
[node name="Extensions" type="Control" parent="."]
anchors_preset = 0
script = ExtResource("15_v0k2h")
[node name="LeftCursor" type="Sprite2D" parent="."]
visible = false
[node name="RightCursor" type="Sprite2D" parent="."]
visible = false
[connection signal="files_selected" from="Dialogs/OpenSprite" to="." method="_on_OpenSprite_files_selected"]
[connection signal="visibility_changed" from="Dialogs/OpenSprite" to="." method="_on_open_sprite_visibility_changed"]
[connection signal="file_selected" from="Dialogs/SaveSprite" to="." method="_on_SaveSprite_file_selected"]
[connection signal="visibility_changed" from="Dialogs/SaveSprite" to="." method="_can_draw_true"]
[connection signal="confirmed" from="Dialogs/SaveSpriteHTML5" to="." method="save_project" binds= [""]]
[connection signal="visibility_changed" from="Dialogs/SaveSpriteHTML5" to="." method="_can_draw_true"]
[connection signal="visibility_changed" from="Dialogs/ExportDialog" to="." method="_can_draw_true"]
[connection signal="visibility_changed" from="Dialogs/UnsavedCanvasDialog" to="." method="_can_draw_true"]
[connection signal="confirmed" from="Dialogs/QuitDialog" to="." method="_on_QuitDialog_confirmed"]
[connection signal="visibility_changed" from="Dialogs/QuitDialog" to="." method="_can_draw_true"]
[connection signal="confirmed" from="Dialogs/QuitAndSaveDialog" to="." method="_on_QuitAndSaveDialog_confirmed"]
[connection signal="custom_action" from="Dialogs/QuitAndSaveDialog" to="." method="_on_QuitAndSaveDialog_custom_action"]
[connection signal="visibility_changed" from="Dialogs/QuitAndSaveDialog" to="." method="_can_draw_true"]
[connection signal="visibility_changed" from="Dialogs/ErrorDialog" to="." method="_can_draw_true"]
[connection signal="visibility_changed" from="Dialogs/BackupConfirmation" to="." method="_on_backup_confirmation_visibility_changed"]