newlon/scenes/gui/runtime_gui.tscn
2025-07-13 04:55:33 +05:00

252 lines
8.4 KiB
Text

[gd_scene load_steps=32 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="Theme" uid="uid://b8l285cjcgeyi" path="res://resources/themes/GameStyle.tres" id="1_xf6ra"]
[ext_resource type="Script" uid="uid://cwa1eydeiy3y4" path="res://scripts/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="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://u5l3jd00s8vd" path="res://scenes/gui/pause_button.tscn" id="5_jyq78"]
[ext_resource type="PackedScene" uid="uid://b4lx8adw6rbqs" path="res://scenes/particles/dirt_explosion.tscn" id="6_5jtun"]
[ext_resource type="Script" uid="uid://c36bj8u7jghc7" path="res://scripts/audio/ChannelPlayer.cs" id="7_5kkbf"]
[ext_resource type="AudioStream" uid="uid://dfbg6dxg4actb" path="res://assets/audio/sfx/shovel.mp3" id="8_xq48m"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_ps2iw"]
texture = ExtResource("2_eg3hk")
texture_margin_left = 4.0
texture_margin_top = 4.0
texture_margin_right = 4.0
texture_margin_bottom = 4.0
axis_stretch_horizontal = 1
[sub_resource type="GDScript" id="GDScript_lxxir"]
resource_name = "shortcutter"
script/source = "extends Node
@export var keys : Array[InputEventKey]
@export var where_to_map : Node
func _ready() -> void:
while get_tree() != null and get_tree().paused:
await get_tree().process_frame
for i in range(where_to_map.get_child_count()):
var key = InputEventKey.new()
where_to_map.get_child(i).shortcut = Shortcut.new()
where_to_map.get_child(i).shortcut.events.append(keys[i])
"
[sub_resource type="InputEventKey" id="InputEventKey_lxxir"]
device = -1
keycode = 49
unicode = 49
[sub_resource type="InputEventKey" id="InputEventKey_5kkbf"]
device = -1
keycode = 50
unicode = 50
[sub_resource type="InputEventKey" id="InputEventKey_xq48m"]
device = -1
keycode = 51
unicode = 51
[sub_resource type="InputEventKey" id="InputEventKey_cti1a"]
device = -1
keycode = 52
unicode = 52
[sub_resource type="InputEventKey" id="InputEventKey_s07y0"]
device = -1
keycode = 53
unicode = 53
[sub_resource type="InputEventKey" id="InputEventKey_hmpwl"]
device = -1
keycode = 54
unicode = 54
[sub_resource type="InputEventKey" id="InputEventKey_kqrbi"]
device = -1
keycode = 55
unicode = 55
[sub_resource type="InputEventKey" id="InputEventKey_s6pj4"]
device = -1
keycode = 56
unicode = 56
[sub_resource type="InputEventKey" id="InputEventKey_ar74i"]
device = -1
keycode = 57
unicode = 57
[sub_resource type="InputEventKey" id="InputEventKey_k8sc7"]
device = -1
keycode = 48
unicode = 48
[sub_resource type="InputEventAction" id="InputEventAction_xq48m"]
action = &"short_shovel"
pressed = true
[sub_resource type="Shortcut" id="Shortcut_cti1a"]
events = [SubResource("InputEventAction_xq48m")]
[sub_resource type="InputEventAction" id="InputEventAction_5kkbf"]
action = &"short_ff"
pressed = true
[sub_resource type="Shortcut" id="Shortcut_xq48m"]
events = [SubResource("InputEventAction_5kkbf")]
[sub_resource type="InputEventAction" id="InputEventAction_cti1a"]
action = &"short_pause"
pressed = true
[sub_resource type="Shortcut" id="Shortcut_s07y0"]
events = [SubResource("InputEventAction_cti1a")]
[sub_resource type="Animation" id="Animation_c8fnk"]
length = 0.001
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:color:a")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(0, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
[sub_resource type="Animation" id="Animation_ffxdv"]
resource_name = "flash"
length = 0.3
step = 0.1
tracks/0/type = "bezier"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:color:a")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(0.25, -0.25, 0, 0, 0.00399721, 0, -0.2, 0.0038315, 0.25, 0),
"times": PackedFloat32Array(0, 0.3)
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_myv2j"]
_data = {
&"RESET": SubResource("Animation_c8fnk"),
&"flash": SubResource("Animation_ffxdv")
}
[node name="RuntimeGUI" type="Control" node_paths=PackedStringArray("SeedpacketsHotbar", "SunCounter")]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
theme = ExtResource("1_xf6ra")
script = ExtResource("2_5fonq")
SeedpacketsHotbar = NodePath("MarginContainer/Control/Hotbar/PanelContainer/Seedpackets")
SunCounter = NodePath("MarginContainer/Control/Hotbar/SunCounter")
[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
anchors_preset = -1
anchor_right = 1.0
anchor_bottom = 0.16
grow_horizontal = 2
mouse_filter = 2
[node name="SunCounter" parent="MarginContainer/Control/Hotbar" instance=ExtResource("1_le3od")]
layout_mode = 2
[node name="PanelContainer" type="PanelContainer" parent="MarginContainer/Control/Hotbar"]
custom_minimum_size = Vector2(377, 64)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxTexture_ps2iw")
[node name="Seedpackets" type="HBoxContainer" parent="MarginContainer/Control/Hotbar/PanelContainer"]
process_mode = 3
layout_mode = 2
mouse_filter = 2
theme_override_constants/separation = 0
[node name="ShortcutSetter" type="Node" parent="MarginContainer/Control/Hotbar/PanelContainer" node_paths=PackedStringArray("where_to_map")]
process_mode = 1
script = SubResource("GDScript_lxxir")
keys = Array[InputEventKey]([SubResource("InputEventKey_lxxir"), SubResource("InputEventKey_5kkbf"), SubResource("InputEventKey_xq48m"), SubResource("InputEventKey_cti1a"), SubResource("InputEventKey_s07y0"), SubResource("InputEventKey_hmpwl"), SubResource("InputEventKey_kqrbi"), SubResource("InputEventKey_s6pj4"), SubResource("InputEventKey_ar74i"), SubResource("InputEventKey_k8sc7")])
where_to_map = NodePath("../Seedpackets")
[node name="Space" type="Control" parent="MarginContainer/Control/Hotbar"]
layout_mode = 2
size_flags_horizontal = 3
[node name="ShovelButton" parent="MarginContainer/Control/Hotbar" instance=ExtResource("3_bheea")]
layout_mode = 2
size_flags_horizontal = 1
size_flags_vertical = 4
shortcut = SubResource("Shortcut_cti1a")
particles = ExtResource("6_5jtun")
[node name="ChannelPlayer" type="Node" parent="MarginContainer/Control/Hotbar/ShovelButton"]
script = ExtResource("7_5kkbf")
audioStream = ExtResource("8_xq48m")
channel = "shovel"
metadata/_custom_type_script = "uid://c36bj8u7jghc7"
[node name="FastForwardButton" parent="MarginContainer/Control/Hotbar" node_paths=PackedStringArray("flashAnimator") instance=ExtResource("4_66uy4")]
layout_mode = 2
shortcut = SubResource("Shortcut_xq48m")
flashAnimator = NodePath("../../../../FastForwardEffect/AnimationPlayer")
[node name="ChannelPlayer" type="Node" parent="MarginContainer/Control/Hotbar/FastForwardButton"]
script = ExtResource("7_5kkbf")
channel = "fastfw"
metadata/_custom_type_script = "uid://c36bj8u7jghc7"
[node name="PauseButton" parent="MarginContainer/Control/Hotbar" instance=ExtResource("5_jyq78")]
process_mode = 3
layout_mode = 2
shortcut = SubResource("Shortcut_s07y0")
[node name="FastForwardEffect" type="ColorRect" parent="."]
z_index = 1
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
color = Color(0.000150553, 0.938204, 0.707471, 0)
metadata/_edit_lock_ = true
[node name="AnimationPlayer" type="AnimationPlayer" parent="FastForwardEffect"]
libraries = {
&"": SubResource("AnimationLibrary_myv2j")
}
[connection signal="pressed" from="MarginContainer/Control/Hotbar/ShovelButton" to="MarginContainer/Control/Hotbar/ShovelButton/ChannelPlayer" method="Play"]