Runtime gui change

This commit is contained in:
Фёдор Веселов 2024-09-22 20:27:43 +05:00
commit ba27274465

View file

@ -1,15 +1,12 @@
[gd_scene load_steps=15 format=3 uid="uid://cfnmspei3k4p7"] [gd_scene load_steps=12 format=3 uid="uid://cfnmspei3k4p7"]
[ext_resource type="PackedScene" uid="uid://ky35veswaytr" path="res://scenes/gui/sun_counter.tscn" id="1_le3od"] [ext_resource type="PackedScene" uid="uid://ky35veswaytr" path="res://scenes/gui/sun_counter.tscn" id="1_le3od"]
[ext_resource type="Theme" uid="uid://b8l285cjcgeyi" path="res://resources/GameStyle.tres" id="1_xf6ra"] [ext_resource type="Theme" uid="uid://b8l285cjcgeyi" path="res://resources/themes/GameStyle.tres" id="1_xf6ra"]
[ext_resource type="PackedScene" uid="uid://c8qru1yhnbbkl" path="res://scenes/gui/plant_card.tscn" id="2_cjtsw"] [ext_resource type="Script" path="res://scripts/components/LevelGUIElements.cs" id="2_5fonq"]
[ext_resource type="Texture2D" uid="uid://bbh0uwloi87tn" path="res://assets/sprites/gui/PlantPanel.png" id="2_eg3hk"] [ext_resource type="Texture2D" uid="uid://bbh0uwloi87tn" path="res://assets/sprites/gui/PlantPanel.png" id="2_eg3hk"]
[ext_resource type="Resource" uid="uid://c8rr1dc7mjr3d" path="res://resources/plants/Peashooter.tres" id="3_42s2d"]
[ext_resource type="PackedScene" uid="uid://t0vpmycj6c8j" path="res://scenes/gui/shovel_button.tscn" id="3_bheea"] [ext_resource type="PackedScene" uid="uid://t0vpmycj6c8j" path="res://scenes/gui/shovel_button.tscn" id="3_bheea"]
[ext_resource type="PackedScene" uid="uid://cgm7td1hgs0rr" path="res://scenes/gui/fast_forward_button.tscn" id="4_66uy4"] [ext_resource type="PackedScene" uid="uid://cgm7td1hgs0rr" path="res://scenes/gui/fast_forward_button.tscn" id="4_66uy4"]
[ext_resource type="Resource" uid="uid://drm42f48urvc4" path="res://resources/plants/Sunflower.tres" id="5_6vih5"]
[ext_resource type="PackedScene" uid="uid://u5l3jd00s8vd" path="res://scenes/gui/pause_button.tscn" id="5_jyq78"] [ext_resource type="PackedScene" uid="uid://u5l3jd00s8vd" path="res://scenes/gui/pause_button.tscn" id="5_jyq78"]
[ext_resource type="Resource" uid="uid://c2e2yj7rgoswi" path="res://resources/plants/Wallnut.tres" id="7_x5txp"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_ps2iw"] [sub_resource type="StyleBoxTexture" id="StyleBoxTexture_ps2iw"]
texture = ExtResource("2_eg3hk") texture = ExtResource("2_eg3hk")
@ -55,7 +52,7 @@ _data = {
"flash": SubResource("Animation_ffxdv") "flash": SubResource("Animation_ffxdv")
} }
[node name="RuntimeGUI" type="Control"] [node name="RuntimeGUI" type="Control" node_paths=PackedStringArray("SeedpacketsHotbar", "SunCounter")]
layout_mode = 3 layout_mode = 3
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
@ -64,69 +61,63 @@ grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
mouse_filter = 2 mouse_filter = 2
theme = ExtResource("1_xf6ra") theme = ExtResource("1_xf6ra")
script = ExtResource("2_5fonq")
SeedpacketsHotbar = NodePath("MarginContainer/Control/Hotbar/PanelContainer/Seedpackets")
SunCounter = NodePath("MarginContainer/Control/Hotbar/SunCounter")
[node name="Hotbar" type="HBoxContainer" parent="."] [node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
theme_override_constants/margin_left = 8
theme_override_constants/margin_top = 0
theme_override_constants/margin_right = 8
theme_override_constants/margin_bottom = 0
[node name="Control" type="Control" parent="MarginContainer"]
layout_mode = 2
mouse_filter = 2
[node name="Hotbar" type="HBoxContainer" parent="MarginContainer/Control"]
layout_mode = 1 layout_mode = 1
anchors_preset = -1 anchors_preset = -1
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 0.14 anchor_bottom = 0.16
offset_bottom = -29.0
grow_horizontal = 2 grow_horizontal = 2
mouse_filter = 2 mouse_filter = 2
[node name="SunCounter" parent="Hotbar" instance=ExtResource("1_le3od")] [node name="SunCounter" parent="MarginContainer/Control/Hotbar" instance=ExtResource("1_le3od")]
layout_mode = 2 layout_mode = 2
[node name="PanelContainer" type="PanelContainer" parent="Hotbar"] [node name="PanelContainer" type="PanelContainer" parent="MarginContainer/Control/Hotbar"]
custom_minimum_size = Vector2(377, 64)
layout_mode = 2 layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxTexture_ps2iw") theme_override_styles/panel = SubResource("StyleBoxTexture_ps2iw")
[node name="Seedpackets" type="HBoxContainer" parent="Hotbar/PanelContainer"] [node name="Seedpackets" type="HBoxContainer" parent="MarginContainer/Control/Hotbar/PanelContainer"]
process_mode = 3
layout_mode = 2 layout_mode = 2
mouse_filter = 2 mouse_filter = 2
theme_override_constants/separation = 0 theme_override_constants/separation = 0
[node name="FirstSlot" parent="Hotbar/PanelContainer/Seedpackets" instance=ExtResource("2_cjtsw")] [node name="Space" type="Control" parent="MarginContainer/Control/Hotbar"]
layout_mode = 2 layout_mode = 2
focus_neighbor_right = NodePath("../SecondSlot") size_flags_horizontal = 3
_resource = ExtResource("3_42s2d")
[node name="SecondSlot" parent="Hotbar/PanelContainer/Seedpackets" instance=ExtResource("2_cjtsw")] [node name="ShovelButton" parent="MarginContainer/Control/Hotbar" instance=ExtResource("3_bheea")]
layout_mode = 2
_resource = ExtResource("5_6vih5")
[node name="ThirdSlot" parent="Hotbar/PanelContainer/Seedpackets" instance=ExtResource("2_cjtsw")]
layout_mode = 2
_resource = ExtResource("7_x5txp")
[node name="FourthSlot" parent="Hotbar/PanelContainer/Seedpackets" instance=ExtResource("2_cjtsw")]
layout_mode = 2
[node name="FifthSlot" parent="Hotbar/PanelContainer/Seedpackets" instance=ExtResource("2_cjtsw")]
layout_mode = 2
[node name="SixthSlot" parent="Hotbar/PanelContainer/Seedpackets" instance=ExtResource("2_cjtsw")]
layout_mode = 2
[node name="SeventhSlot" parent="Hotbar/PanelContainer/Seedpackets" instance=ExtResource("2_cjtsw")]
layout_mode = 2
[node name="EighthSlot" parent="Hotbar/PanelContainer/Seedpackets" instance=ExtResource("2_cjtsw")]
layout_mode = 2
[node name="NinthSlot" parent="Hotbar/PanelContainer/Seedpackets" instance=ExtResource("2_cjtsw")]
layout_mode = 2
[node name="ShovelButton" parent="Hotbar" instance=ExtResource("3_bheea")]
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 1 size_flags_horizontal = 1
size_flags_vertical = 4 size_flags_vertical = 4
[node name="FastForwardButton" parent="Hotbar" node_paths=PackedStringArray("flashAnimator") instance=ExtResource("4_66uy4")] [node name="FastForwardButton" parent="MarginContainer/Control/Hotbar" node_paths=PackedStringArray("flashAnimator") instance=ExtResource("4_66uy4")]
layout_mode = 2 layout_mode = 2
flashAnimator = NodePath("../../FastForwardEffect/AnimationPlayer") flashAnimator = NodePath("../../../../FastForwardEffect/AnimationPlayer")
[node name="PauseButton" parent="Hotbar" instance=ExtResource("5_jyq78")] [node name="PauseButton" parent="MarginContainer/Control/Hotbar" instance=ExtResource("5_jyq78")]
layout_mode = 2 layout_mode = 2
[node name="FastForwardEffect" type="ColorRect" parent="."] [node name="FastForwardEffect" type="ColorRect" parent="."]