little editor refactor
This commit is contained in:
parent
dd154e3cd1
commit
9eba7d3069
10 changed files with 16 additions and 5 deletions
|
|
@ -0,0 +1,27 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://iwnklc62rni8"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cpedvgx23hlko" path="res://addons/pvzadventure/scripts/zombie-editor/ZE_AssetBrowserButton.cs" id="1_jbknv"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jbknv"]
|
||||
bg_color = Color(0.18359, 0.18359, 0.18359, 1)
|
||||
border_color = Color(0.140447, 0.140447, 0.140447, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[node name="AssetBrowserButton" type="PanelContainer"]
|
||||
clip_contents = true
|
||||
custom_minimum_size = Vector2(100, 100)
|
||||
anchors_preset = -1
|
||||
anchor_right = 0.172
|
||||
anchor_bottom = 0.25
|
||||
offset_right = -0.200005
|
||||
offset_bottom = -15.0
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_jbknv")
|
||||
script = ExtResource("1_jbknv")
|
||||
|
||||
[node name="Texture" type="TextureRect" parent="."]
|
||||
layout_mode = 2
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
27
addons/pvzadventure/scenes/zombie-editor/ze_grid_item.tscn
Normal file
27
addons/pvzadventure/scenes/zombie-editor/ze_grid_item.tscn
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://segxys6udhyw"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://fof6kr0et8ng" path="res://addons/pvzadventure/scripts/zombie-editor/ZE_GridItem.cs" id="1_fwfh1"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_jbknv"]
|
||||
bg_color = Color(0.18359, 0.18359, 0.18359, 1)
|
||||
border_color = Color(0.140447, 0.140447, 0.140447, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[node name="GridItem" type="PanelContainer"]
|
||||
clip_contents = true
|
||||
custom_minimum_size = Vector2(100, 100)
|
||||
anchors_preset = -1
|
||||
anchor_right = 0.172
|
||||
anchor_bottom = 0.25
|
||||
offset_right = -0.200005
|
||||
offset_bottom = -15.0
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_jbknv")
|
||||
script = ExtResource("1_fwfh1")
|
||||
|
||||
[node name="Texture" type="TextureRect" parent="."]
|
||||
layout_mode = 2
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
11
addons/pvzadventure/scenes/zombie-editor/ze_row_editor.tscn
Normal file
11
addons/pvzadventure/scenes/zombie-editor/ze_row_editor.tscn
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://buvnw8a7pku78"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://q84g5imvatfl" path="res://addons/pvzadventure/scripts/zombie-editor/ZE_RowEditor.cs" id="1_wm7b4"]
|
||||
|
||||
[node name="RowEditor" type="VBoxContainer"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_wm7b4")
|
||||
136
addons/pvzadventure/scenes/zombie-editor/zombie_editor.tscn
Normal file
136
addons/pvzadventure/scenes/zombie-editor/zombie_editor.tscn
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
[gd_scene load_steps=10 format=3 uid="uid://db5ah76l43ng2"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bnuno3uhya4sg" path="res://addons/pvzadventure/scripts/zombie-editor/ZE_AssetBrowser.cs" id="1_klhya"]
|
||||
[ext_resource type="Script" uid="uid://bd5hl0etgvf5a" path="res://addons/pvzadventure/scripts/zombie-editor/ZombieEditor.cs" id="1_thd7y"]
|
||||
[ext_resource type="Script" uid="uid://do7s5mo36c280" path="res://addons/pvzadventure/scripts/zombie-editor/ZE_GridContainer.cs" id="2_13ic4"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_thd7y"]
|
||||
bg_color = Color(0.430693, 0.742747, 0.314214, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_a2umq"]
|
||||
bg_color = Color(0.503317, 0.859941, 0.370424, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_13ic4"]
|
||||
bg_color = Color(0.655235, 0.676224, 0.627655, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_h81wb"]
|
||||
bg_color = Color(1, 0.617482, 0.590722, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_vak4b"]
|
||||
bg_color = Color(0.655235, 0.676224, 0.627655, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_nm0oj"]
|
||||
bg_color = Color(0.999983, 0.30398, 0.31271, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[node name="ZombieEditor" type="VBoxContainer" node_paths=PackedStringArray("container")]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_thd7y")
|
||||
container = NodePath("ZombieGrid/HBoxContainer/RowEditors")
|
||||
|
||||
[node name="ZombieGrid" type="ScrollContainer" parent="."]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
size_flags_stretch_ratio = 3.0
|
||||
horizontal_scroll_mode = 2
|
||||
vertical_scroll_mode = 0
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="ZombieGrid"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="RowEditors" type="HBoxContainer" parent="ZombieGrid/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
size_flags_stretch_ratio = 3.0
|
||||
script = ExtResource("2_13ic4")
|
||||
|
||||
[node name="ControlButtons" type="VBoxContainer" parent="ZombieGrid/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="NewButton" type="Button" parent="ZombieGrid/HBoxContainer/ControlButtons"]
|
||||
custom_minimum_size = Vector2(32, 0)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_colors/font_disabled_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/font_hover_pressed_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/font_hover_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/font_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/font_focus_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/font_pressed_color = Color(0, 0, 0, 1)
|
||||
theme_override_font_sizes/font_size = 24
|
||||
theme_override_styles/disabled_mirrored = SubResource("StyleBoxFlat_thd7y")
|
||||
theme_override_styles/disabled = SubResource("StyleBoxFlat_thd7y")
|
||||
theme_override_styles/hover_pressed = SubResource("StyleBoxFlat_a2umq")
|
||||
theme_override_styles/hover_mirrored = SubResource("StyleBoxFlat_a2umq")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_thd7y")
|
||||
theme_override_styles/pressed_mirrored = SubResource("StyleBoxFlat_13ic4")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_13ic4")
|
||||
theme_override_styles/normal_mirrored = SubResource("StyleBoxFlat_thd7y")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_thd7y")
|
||||
text = "+"
|
||||
|
||||
[node name="RemoveButton" type="Button" parent="ZombieGrid/HBoxContainer/ControlButtons"]
|
||||
custom_minimum_size = Vector2(32, 0)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_colors/font_disabled_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/font_hover_pressed_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/font_hover_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/font_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/font_focus_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/font_pressed_color = Color(0, 0, 0, 1)
|
||||
theme_override_font_sizes/font_size = 24
|
||||
theme_override_styles/disabled_mirrored = SubResource("StyleBoxFlat_h81wb")
|
||||
theme_override_styles/disabled = SubResource("StyleBoxFlat_h81wb")
|
||||
theme_override_styles/hover_pressed = SubResource("StyleBoxFlat_h81wb")
|
||||
theme_override_styles/hover_mirrored = SubResource("StyleBoxFlat_h81wb")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_h81wb")
|
||||
theme_override_styles/pressed_mirrored = SubResource("StyleBoxFlat_vak4b")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_vak4b")
|
||||
theme_override_styles/normal_mirrored = SubResource("StyleBoxFlat_nm0oj")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_nm0oj")
|
||||
text = "-"
|
||||
|
||||
[node name="AssetBrowser" type="ScrollContainer" parent="."]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
vertical_scroll_mode = 0
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="AssetBrowser"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
script = ExtResource("1_klhya")
|
||||
|
||||
[connection signal="SaveCallback" from="ZombieGrid/HBoxContainer/RowEditors" to="." method="Save"]
|
||||
[connection signal="pressed" from="ZombieGrid/HBoxContainer/ControlButtons/NewButton" to="ZombieGrid/HBoxContainer/RowEditors" method="AddSpawn"]
|
||||
[connection signal="pressed" from="ZombieGrid/HBoxContainer/ControlButtons/RemoveButton" to="ZombieGrid/HBoxContainer/RowEditors" method="RemoveSpawn"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue