mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-03-15 15:55:18 +00:00
Closes #1061, fixes issue where when Pixelorama's window loses focus, the dialogs disappeared, but the dialogs can no longer close when pressing outside of them.
151 lines
5.3 KiB
Text
151 lines
5.3 KiB
Text
[gd_scene load_steps=7 format=3 uid="uid://d1phd84dk4t5e"]
|
|
|
|
[ext_resource type="Script" path="res://src/UI/Dialogs/ManageLayouts.gd" id="1"]
|
|
[ext_resource type="Script" path="res://addons/dockable_container/layout_panel.gd" id="2"]
|
|
[ext_resource type="Script" path="res://addons/dockable_container/layout.gd" id="3"]
|
|
[ext_resource type="Script" path="res://addons/dockable_container/dockable_container.gd" id="4"]
|
|
|
|
[sub_resource type="Resource" id="1"]
|
|
resource_name = "Tabs"
|
|
script = ExtResource("2")
|
|
names = PackedStringArray()
|
|
current_tab = -1
|
|
|
|
[sub_resource type="Resource" id="2"]
|
|
resource_name = "Layout"
|
|
script = ExtResource("3")
|
|
root = SubResource("1")
|
|
hidden_tabs = {}
|
|
save_on_change = false
|
|
|
|
[node name="ManageLayouts" type="AcceptDialog"]
|
|
title = "Manage Layouts"
|
|
size = Vector2i(500, 500)
|
|
script = ExtResource("1")
|
|
|
|
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
offset_left = 8.0
|
|
offset_top = 8.0
|
|
offset_right = -8.0
|
|
offset_bottom = -49.0
|
|
|
|
[node name="PreviewHeader" type="HBoxContainer" parent="VBoxContainer"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 0
|
|
|
|
[node name="Label" type="Label" parent="VBoxContainer/PreviewHeader"]
|
|
layout_mode = 2
|
|
theme_type_variation = &"HeaderSmall"
|
|
text = "Preview"
|
|
|
|
[node name="HSeparator" type="HSeparator" parent="VBoxContainer/PreviewHeader"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
|
|
[node name="PreviewInstruction" type="Label" parent="VBoxContainer"]
|
|
layout_mode = 2
|
|
text = "This is a preview, changing this won't change the layout"
|
|
|
|
[node name="PreviewContainer" type="ScrollContainer" parent="VBoxContainer"]
|
|
layout_mode = 2
|
|
size_flags_vertical = 3
|
|
|
|
[node name="LayoutPreview" type="Container" parent="VBoxContainer/PreviewContainer"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
size_flags_vertical = 3
|
|
script = ExtResource("4")
|
|
tabs_visible = false
|
|
layout = SubResource("2")
|
|
|
|
[node name="LayoutsHeader" type="HBoxContainer" parent="VBoxContainer"]
|
|
layout_mode = 2
|
|
theme_override_constants/separation = 0
|
|
|
|
[node name="Label" type="Label" parent="VBoxContainer/LayoutsHeader"]
|
|
layout_mode = 2
|
|
theme_type_variation = &"HeaderSmall"
|
|
text = "Layouts"
|
|
|
|
[node name="HSeparator" type="HSeparator" parent="VBoxContainer/LayoutsHeader"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
|
|
[node name="LayoutInstruction" type="Label" parent="VBoxContainer"]
|
|
layout_mode = 2
|
|
text = "Double click to set as new startup layout"
|
|
|
|
[node name="SavedLayouts" type="ItemList" parent="VBoxContainer"]
|
|
unique_name_in_owner = true
|
|
custom_minimum_size = Vector2(0, 100)
|
|
layout_mode = 2
|
|
|
|
[node name="ButtonsContainer" type="HBoxContainer" parent="VBoxContainer"]
|
|
layout_mode = 2
|
|
|
|
[node name="AddLayout" type="Button" parent="VBoxContainer/ButtonsContainer"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
mouse_default_cursor_shape = 2
|
|
text = "Add"
|
|
|
|
[node name="RenameLayout" type="Button" parent="VBoxContainer/ButtonsContainer"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
mouse_default_cursor_shape = 2
|
|
disabled = true
|
|
text = "Rename"
|
|
|
|
[node name="DeleteLayout" type="Button" parent="VBoxContainer/ButtonsContainer"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
mouse_default_cursor_shape = 2
|
|
disabled = true
|
|
text = "Delete"
|
|
|
|
[node name="LayoutSettings" type="ConfirmationDialog" parent="."]
|
|
|
|
[node name="VBoxContainer" type="VBoxContainer" parent="LayoutSettings"]
|
|
offset_right = 40.0
|
|
offset_bottom = 40.0
|
|
|
|
[node name="LayoutName" type="LineEdit" parent="LayoutSettings/VBoxContainer"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
placeholder_text = "Insert name"
|
|
|
|
[node name="HBoxContainer" type="HBoxContainer" parent="LayoutSettings/VBoxContainer"]
|
|
layout_mode = 2
|
|
|
|
[node name="LayoutFromLabel" type="Label" parent="LayoutSettings/VBoxContainer/HBoxContainer"]
|
|
layout_mode = 2
|
|
text = "Copy from"
|
|
|
|
[node name="LayoutFrom" type="OptionButton" parent="LayoutSettings/VBoxContainer/HBoxContainer"]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
item_count = 1
|
|
selected = 0
|
|
popup/item_0/text = "Current layout"
|
|
popup/item_0/id = 0
|
|
|
|
[node name="DeleteConfirmation" type="ConfirmationDialog" parent="."]
|
|
dialog_text = "Are you sure you want to delete this layout?"
|
|
|
|
[connection signal="about_to_popup" from="." to="." method="_on_ManageLayouts_about_to_show"]
|
|
[connection signal="visibility_changed" from="." to="." method="_on_ManageLayouts_visibility_changed"]
|
|
[connection signal="empty_clicked" from="VBoxContainer/SavedLayouts" to="." method="_on_SavedLayouts_empty_clicked"]
|
|
[connection signal="item_activated" from="VBoxContainer/SavedLayouts" to="." method="_on_SavedLayouts_item_activated"]
|
|
[connection signal="item_selected" from="VBoxContainer/SavedLayouts" to="." method="_on_SavedLayouts_item_selected"]
|
|
[connection signal="pressed" from="VBoxContainer/ButtonsContainer/AddLayout" to="." method="_on_AddLayout_pressed"]
|
|
[connection signal="pressed" from="VBoxContainer/ButtonsContainer/RenameLayout" to="." method="_on_rename_layout_pressed"]
|
|
[connection signal="pressed" from="VBoxContainer/ButtonsContainer/DeleteLayout" to="." method="_on_DeleteLayout_pressed"]
|
|
[connection signal="confirmed" from="LayoutSettings" to="." method="_on_LayoutSettings_confirmed"]
|
|
[connection signal="confirmed" from="DeleteConfirmation" to="." method="_on_DeleteConfirmation_confirmed"]
|