Set up the Continent editor's base ui.

This commit is contained in:
Relintai 2021-12-25 02:29:30 +01:00
parent 13428b9a33
commit ba1c85b729
3 changed files with 104 additions and 27 deletions

View File

@ -1,7 +1,8 @@
[gd_scene load_steps=3 format=2]
[gd_scene load_steps=4 format=2]
[ext_resource path="res://addons/world_generator/ui/MainScreen.gd" type="Script" id=1]
[ext_resource path="res://addons/world_generator/ui/tabs/World.tscn" type="PackedScene" id=2]
[ext_resource path="res://addons/world_generator/ui/tabs/Continent.tscn" type="PackedScene" id=3]
[node name="WorldGenerator" type="PanelContainer"]
anchor_right = 1.0
@ -22,32 +23,7 @@ tab_align = 0
[node name="World" parent="TabContainer" instance=ExtResource( 2 )]
[node name="Continent" type="VBoxContainer" parent="TabContainer"]
visible = false
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 4.0
margin_top = 32.0
margin_right = -4.0
margin_bottom = -4.0
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HBoxContainer" type="HBoxContainer" parent="TabContainer/Continent"]
margin_right = 1002.0
margin_bottom = 20.0
[node name="AddButton" type="Button" parent="TabContainer/Continent/HBoxContainer"]
margin_right = 37.0
margin_bottom = 20.0
text = "Add"
[node name="DeleteButton" type="Button" parent="TabContainer/Continent/HBoxContainer"]
margin_left = 41.0
margin_right = 96.0
margin_bottom = 20.0
text = "Delete"
[node name="Continent" parent="TabContainer" instance=ExtResource( 3 )]
[node name="Zone" type="VBoxContainer" parent="TabContainer"]
visible = false

View File

@ -0,0 +1,3 @@
tool
extends HBoxContainer

View File

@ -0,0 +1,98 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://addons/world_generator/ui/tabs/Continent.gd" type="Script" id=1]
[ext_resource path="res://addons/world_generator/ui/ResourcePropertyList.tscn" type="PackedScene" id=2]
[ext_resource path="res://addons/world_generator/ui/DataList.tscn" type="PackedScene" id=3]
[ext_resource path="res://addons/world_generator/ui/RectEditor.tscn" type="PackedScene" id=4]
[node name="Continent" type="HBoxContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="HSplitContainer" type="HSplitContainer" parent="."]
margin_right = 1024.0
margin_bottom = 600.0
size_flags_horizontal = 3
[node name="RectEditor" parent="HSplitContainer" instance=ExtResource( 4 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 735.0
margin_bottom = 600.0
size_flags_horizontal = 3
[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer"]
margin_left = 747.0
margin_right = 1024.0
margin_bottom = 600.0
[node name="MenuButton" type="OptionButton" parent="HSplitContainer/VBoxContainer"]
margin_right = 277.0
margin_bottom = 20.0
selected = 0
[node name="HBoxContainer2" type="HBoxContainer" parent="HSplitContainer/VBoxContainer"]
margin_top = 24.0
margin_right = 277.0
margin_bottom = 600.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="ResourcePropertyList" parent="HSplitContainer/VBoxContainer/HBoxContainer2" instance=ExtResource( 2 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 100.0
margin_bottom = 576.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/VBoxContainer/HBoxContainer2"]
margin_left = 104.0
margin_right = 277.0
margin_bottom = 576.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="Label" type="Label" parent="HSplitContainer/VBoxContainer/HBoxContainer2/VBoxContainer"]
margin_right = 173.0
margin_bottom = 14.0
text = "Zones"
align = 1
valign = 1
[node name="HBoxContainer" type="HBoxContainer" parent="HSplitContainer/VBoxContainer/HBoxContainer2/VBoxContainer"]
margin_top = 18.0
margin_right = 173.0
margin_bottom = 38.0
[node name="AddButton" type="Button" parent="HSplitContainer/VBoxContainer/HBoxContainer2/VBoxContainer/HBoxContainer"]
margin_right = 37.0
margin_bottom = 20.0
text = "Add"
[node name="DeleteButton" type="Button" parent="HSplitContainer/VBoxContainer/HBoxContainer2/VBoxContainer/HBoxContainer"]
margin_left = 41.0
margin_right = 96.0
margin_bottom = 20.0
text = "Delete"
[node name="Duplicate" type="Button" parent="HSplitContainer/VBoxContainer/HBoxContainer2/VBoxContainer/HBoxContainer"]
margin_left = 100.0
margin_right = 173.0
margin_bottom = 20.0
text = "Duplicate"
[node name="DataList" parent="HSplitContainer/VBoxContainer/HBoxContainer2/VBoxContainer" instance=ExtResource( 3 )]
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 42.0
margin_right = 173.0
margin_bottom = 576.0
[connection signal="pressed" from="HSplitContainer/VBoxContainer/HBoxContainer2/VBoxContainer/HBoxContainer/AddButton" to="HSplitContainer/VBoxContainer/HBoxContainer2/VBoxContainer/DataList" method="add_button_pressed"]