add tween plugin and refactoring UI

This commit is contained in:
2026-05-31 21:23:58 +02:00
parent eedd303faa
commit 6976cee6e1
63 changed files with 2029 additions and 490 deletions

1096
addons/TweenFX/TweenFX.gd Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
uid://d2n10rw2dnx8o

View File

@@ -0,0 +1,43 @@
## Internal tracking system for TweenFX.
## [br][br]
## Manages active tweens per node, handles cleanup when nodes are freed,
## and provides stop/query methods. Not intended for direct use —
## access through [TweenFX] instead.
static var _active: Dictionary = {} # { node: { TweenFX.Animations.X: tween } }
static func track(node: CanvasItem, anim: TweenFX.Animations, tween: Tween) -> void:
if not _active.has(node):
_active[node] = {}
if not node.tree_exiting.is_connected(_on_node_exiting):
node.tree_exiting.connect(_on_node_exiting.bind(node), CONNECT_ONE_SHOT)
_active[node][anim] = tween
tween.finished.connect(_on_tween_finished.bind(node, anim), CONNECT_ONE_SHOT)
static func stop(node: CanvasItem, anim: TweenFX.Animations) -> void:
if not _active.has(node) or not _active[node].has(anim):
return
_active[node][anim].kill()
_active[node].erase(anim)
if _active[node].is_empty():
_active.erase(node)
static func stop_all(node: CanvasItem) -> void:
if not _active.has(node):
return
for tween in _active[node].values():
tween.kill()
_active.erase(node)
static func is_playing(node: CanvasItem, anim: TweenFX.Animations) -> bool:
return _active.has(node) and _active[node].has(anim)
static func _on_tween_finished(node: CanvasItem, anim: TweenFX.Animations) -> void:
if not _active.has(node):
return
_active[node].erase(anim)
if _active[node].is_empty():
_active.erase(node)
static func _on_node_exiting(node: CanvasItem) -> void:
_active.erase(node)

View File

@@ -0,0 +1 @@
uid://bc8i1qm1d8hrv

BIN
addons/TweenFX/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://chf2ss61jydw3"
path="res://.godot/imported/icon.png-1df28cd6ae5654ad60ac96bf24b7c782.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/TweenFX/icon.png"
dest_files=["res://.godot/imported/icon.png-1df28cd6ae5654ad60ac96bf24b7c782.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@@ -0,0 +1,7 @@
[plugin]
name="TweenFX"+
icon="res://addons/TweenFX/icon.png"
description= "A simple, juicy tween animation library for Godot"
author="EvilBunnyMan"
version="1.2"
script="plugin.gd"

10
addons/TweenFX/plugin.gd Normal file
View File

@@ -0,0 +1,10 @@
@tool
extends EditorPlugin
func _enable_plugin():
add_autoload_singleton("TweenFX", "res://addons/TweenFX/TweenFX.gd")
print("[TweenFX] Enabled")
func _disable_plugin():
remove_autoload_singleton("TweenFX")
print("[TweenFX] Disabled")

View File

@@ -0,0 +1 @@
uid://wu3r36bvv8u

View File

@@ -1,10 +1,8 @@
@tool
extends Control
extends Button
class_name ArrowButton
signal on_pressed
@export var image: Texture:
set(value):
image = value
@@ -24,6 +22,18 @@ func _ready():
$%Texture.flip_h = flip_h
func _on_gui_input(event: InputEvent) -> void:
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
on_pressed.emit()
func _on_pressed() -> void:
if TweenFX.is_playing(self, TweenFX.Animations.PUNCH_IN):
return
TweenFX.punch_in(self)
func _on_mouse_entered() -> void:
if TweenFX.is_playing(self, TweenFX.Animations.BREATHE):
return
TweenFX.breathe(self, 1)
func _on_mouse_exited() -> void:
TweenFX.stop(self, TweenFX.Animations.BREATHE)
scale = Vector2(1, 1)

View File

@@ -2,37 +2,44 @@
[ext_resource type="Texture2D" uid="uid://cm7fok7lhrano" path="res://core/game_menu/assets/page_1/freccetta.png" id="1_vbu0v"]
[ext_resource type="Script" uid="uid://3uxuhvua1036" path="res://core/game_menu/arrow_button.gd" id="2_xq7pl"]
[ext_resource type="PackedScene" uid="uid://dxun0jk5t0n6" path="res://core/game_menu/hoover_tween.tscn" id="3_hu4cn"]
[node name="ArrowButton" type="Control" unique_id=1696751730]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_xq7pl"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_hu4cn"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_fttf3"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_05bm2"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_kc324"]
[node name="ArrowButton" type="Button" unique_id=579258112]
custom_minimum_size = Vector2(101, 124)
layout_mode = 3
anchors_preset = -1
anchor_right = 0.052604165
anchor_bottom = 0.11481482
pivot_offset_ratio = Vector2(0.5, 0.5)
theme_override_styles/normal = SubResource("StyleBoxEmpty_xq7pl")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_hu4cn")
theme_override_styles/hover = SubResource("StyleBoxEmpty_fttf3")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_05bm2")
theme_override_styles/focus = SubResource("StyleBoxEmpty_kc324")
script = ExtResource("2_xq7pl")
image = ExtResource("1_vbu0v")
metadata/_edit_use_anchors_ = true
[node name="Texture" type="TextureRect" parent="." unique_id=91599097]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
pivot_offset = Vector2(0.5, 0.5)
script = ExtResource("2_xq7pl")
image = ExtResource("1_vbu0v")
[node name="Texture" type="TextureRect" parent="." unique_id=91599097]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = -1
anchor_left = 0.47369793
anchor_top = 0.4425926
anchor_right = 0.5263021
anchor_bottom = 0.5574074
grow_horizontal = 2
grow_vertical = 2
pivot_offset_ratio = Vector2(0.5, 0.5)
mouse_filter = 2
texture = ExtResource("1_vbu0v")
metadata/_edit_use_anchors_ = true
[node name="HooverTween" parent="." unique_id=2115829120 node_paths=PackedStringArray("detector_node", "visual_node") instance=ExtResource("3_hu4cn")]
detector_node = NodePath("..")
visual_node = NodePath("../Texture")
[connection signal="gui_input" from="." to="." method="_on_gui_input"]
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]
[connection signal="pressed" from="." to="." method="_on_pressed"]

View File

@@ -32,6 +32,7 @@ texture = ExtResource("2_vudub")
stretch_mode = 5
[node name="HSlider" type="HSlider" parent="." unique_id=1286896253]
process_mode = 3
layout_mode = 2
theme_override_icons/grabber = ExtResource("3_vf41c")
theme_override_icons/grabber_highlight = ExtResource("3_vf41c")

View File

@@ -1,5 +1,5 @@
@tool
extends Control
extends Button
@export var locked: bool = true
@export var image: Texture:
@@ -13,10 +13,16 @@ extends Control
func _ready():
if image != null and has_node("%Texture"):
$%Texture.texture = image
if has_node("%TextureRect") and has_node("%HooverTween"):
if has_node("%TextureRect"):
if locked:
$%TextureRect.show()
$%HooverTween.queue_free()
else:
$%TextureRect.hide()
TweenFX.breathe(self, 1)
func _on_pressed() -> void:
if TweenFX.is_playing(self, TweenFX.Animations.PRESS_ROTATE):
return
TweenFX.press_rotate(self)

View File

@@ -1,51 +1,82 @@
[gd_scene format=3 uid="uid://wckwvvnk8bt4"]
[ext_resource type="Script" uid="uid://c7q3d823b1v1h" path="res://core/game_menu/biome_picker.gd" id="1_jqji0"]
[ext_resource type="Texture2D" uid="uid://dc0sl04wem136" path="res://core/game_menu/assets/page_1/color_main_biome.png" id="2_8s4h5"]
[ext_resource type="Texture2D" uid="uid://dj6pt25w5i4jq" path="res://core/game_menu/assets/page_1/lucchetto.png" id="2_jqji0"]
[ext_resource type="PackedScene" uid="uid://dxun0jk5t0n6" path="res://core/game_menu/hoover_tween.tscn" id="4_8s4h5"]
[node name="BiomePicker" type="Control" unique_id=52821564]
layout_mode = 3
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_jqji0"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_8s4h5"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ntcky"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_aj0ly"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_sqe3j"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_0slqm"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_idpud"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_7dp31"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_le5rt"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_rs8ck"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_6gubq"]
[node name="BiomePicker" type="Button" unique_id=913478047]
custom_minimum_size = Vector2(161, 343)
anchors_preset = -1
anchor_right = 0.08385417
anchor_bottom = 0.3175926
offset_right = -153.0
offset_bottom = -335.0
pivot_offset_ratio = Vector2(0.5, 0.5)
theme_override_styles/normal = SubResource("StyleBoxEmpty_jqji0")
theme_override_styles/normal_mirrored = SubResource("StyleBoxEmpty_8s4h5")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_ntcky")
theme_override_styles/pressed_mirrored = SubResource("StyleBoxEmpty_aj0ly")
theme_override_styles/hover = SubResource("StyleBoxEmpty_sqe3j")
theme_override_styles/hover_mirrored = SubResource("StyleBoxEmpty_0slqm")
theme_override_styles/hover_pressed = SubResource("StyleBoxEmpty_idpud")
theme_override_styles/hover_pressed_mirrored = SubResource("StyleBoxEmpty_7dp31")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_le5rt")
theme_override_styles/disabled_mirrored = SubResource("StyleBoxEmpty_rs8ck")
theme_override_styles/focus = SubResource("StyleBoxEmpty_6gubq")
script = ExtResource("1_jqji0")
image = ExtResource("2_8s4h5")
metadata/_edit_use_anchors_ = true
[node name="Texture" type="TextureRect" parent="." unique_id=606844933]
unique_name_in_owner = true
custom_minimum_size = Vector2(161, 343)
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_jqji0")
[node name="Texture" type="TextureRect" parent="." unique_id=606844933]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = -1
anchor_left = 0.47161457
anchor_top = 0.39027777
anchor_right = 0.5283854
anchor_bottom = 0.6097222
grow_horizontal = 2
grow_vertical = 2
pivot_offset_ratio = Vector2(0.5, 0.5)
texture = ExtResource("2_8s4h5")
stretch_mode = 3
metadata/_edit_use_anchors_ = true
[node name="TextureRect" type="TextureRect" parent="Texture" unique_id=288045010]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -20.0
offset_top = -20.0
offset_right = 20.0
offset_bottom = 20.0
anchors_preset = -1
anchor_left = 0.36645964
anchor_top = 0.41690964
anchor_right = 0.6335404
anchor_bottom = 0.58309036
offset_left = 1.5
offset_top = 8.5
offset_right = -1.5
offset_bottom = -8.5
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
texture = ExtResource("2_jqji0")
[node name="HooverTween" parent="." unique_id=160227524 node_paths=PackedStringArray("detector_node", "visual_node") instance=ExtResource("4_8s4h5")]
unique_name_in_owner = true
detector_node = NodePath("..")
visual_node = NodePath("../Texture")
scale_amount = Vector2(1.05, 1.05)
[connection signal="pressed" from="." to="." method="_on_pressed"]

View File

@@ -1,56 +1,60 @@
[gd_scene format=3 uid="uid://bc60gon7fmvbr"]
[ext_resource type="PackedScene" uid="uid://dm3skv22c60tm" path="res://core/game_menu/arrow_button.tscn" id="1_16l2d"]
[ext_resource type="Texture2D" uid="uid://dqqnfnero7ckl" path="res://core/game_menu/assets/page_1/chooseyourbiome_text.png" id="1_wyms5"]
[ext_resource type="PackedScene" uid="uid://wckwvvnk8bt4" path="res://core/game_menu/biome_picker.tscn" id="2_q1k23"]
[ext_resource type="Texture2D" uid="uid://cin3kt42e6w3u" path="res://core/game_menu/assets/page_1/color_sx_biome.png" id="2_xjika"]
[ext_resource type="Texture2D" uid="uid://dc0sl04wem136" path="res://core/game_menu/assets/page_1/color_main_biome.png" id="3_0noye"]
[ext_resource type="Texture2D" uid="uid://c3qcivnwuisju" path="res://core/game_menu/assets/page_1/color_dx_biome.png" id="4_0noye"]
[ext_resource type="PackedScene" uid="uid://dxun0jk5t0n6" path="res://core/tween/container_tween.tscn" id="6_hjy5b"]
[node name="BiomeSelector" type="HBoxContainer" unique_id=291322067]
offset_right = 700.0
offset_bottom = 400.0
[node name="VBoxContainer" type="VBoxContainer" unique_id=1692688717]
offset_right = 685.0
offset_bottom = 418.0
[node name="ChooseYourBiomeTexture" type="TextureRect" parent="." unique_id=1769445385]
layout_mode = 2
texture = ExtResource("1_wyms5")
stretch_mode = 3
[node name="Spacer" type="Control" parent="." unique_id=1648681786]
custom_minimum_size = Vector2(0, 30)
layout_mode = 2
[node name="BiomeSelector" type="HBoxContainer" parent="." unique_id=291322067]
layout_mode = 2
theme_override_constants/separation = 0
alignment = 1
[node name="ArrowButtonLeft" parent="." unique_id=1696751730 instance=ExtResource("1_16l2d")]
[node name="ArrowButtonLeft" parent="BiomeSelector" unique_id=1696751730 instance=ExtResource("1_16l2d")]
layout_mode = 2
size_flags_vertical = 4
flip_h = true
[node name="HBoxContainer2" type="HBoxContainer" parent="." unique_id=1117886768]
[node name="HBoxContainer2" type="HBoxContainer" parent="BiomeSelector" unique_id=1117886768]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/separation = 0
alignment = 1
[node name="BiomePicker1" parent="HBoxContainer2" unique_id=477354740 instance=ExtResource("2_q1k23")]
[node name="BiomePicker1" parent="BiomeSelector/HBoxContainer2" unique_id=477354740 instance=ExtResource("2_q1k23")]
layout_mode = 2
size_flags_horizontal = 3
image = ExtResource("2_xjika")
[node name="BiomePicker2" parent="HBoxContainer2" unique_id=52821564 instance=ExtResource("2_q1k23")]
custom_minimum_size = Vector2(200, 400)
[node name="BiomePicker2" parent="BiomeSelector/HBoxContainer2" unique_id=52821564 instance=ExtResource("2_q1k23")]
layout_mode = 2
size_flags_horizontal = 3
locked = false
image = ExtResource("3_0noye")
[node name="Texture" parent="HBoxContainer2/BiomePicker2" index="0" unique_id=606844933]
texture = ExtResource("3_0noye")
[node name="TextureRect" parent="HBoxContainer2/BiomePicker2/Texture" index="0" unique_id=288045010]
visible = false
[node name="HooverTween" parent="HBoxContainer2/BiomePicker2" index="1" unique_id=160227524]
always_active = true
[node name="BiomePicker3" parent="HBoxContainer2" unique_id=1567545303 instance=ExtResource("2_q1k23")]
[node name="BiomePicker3" parent="BiomeSelector/HBoxContainer2" unique_id=1567545303 instance=ExtResource("2_q1k23")]
layout_mode = 2
size_flags_horizontal = 3
image = ExtResource("4_0noye")
[node name="ArrowButtonRight" parent="." unique_id=1741162553 instance=ExtResource("1_16l2d")]
[node name="ArrowButtonRight" parent="BiomeSelector" unique_id=1741162553 instance=ExtResource("1_16l2d")]
layout_mode = 2
size_flags_vertical = 4
[editable path="HBoxContainer2/BiomePicker2"]
[node name="ContainerTween" parent="." unique_id=160227524 node_paths=PackedStringArray("targets") instance=ExtResource("6_hjy5b")]
unique_name_in_owner = true
targets = [NodePath("../BiomeSelector/ArrowButtonLeft"), NodePath("../BiomeSelector/HBoxContainer2/BiomePicker1"), NodePath("../BiomeSelector/HBoxContainer2/BiomePicker2"), NodePath("../BiomeSelector/HBoxContainer2/BiomePicker3"), NodePath("../BiomeSelector/ArrowButtonRight")]

View File

@@ -2,6 +2,7 @@
[ext_resource type="Script" uid="uid://dq3qtcrdnikl7" path="res://core/game_menu/collectible_gallery.gd" id="1_67tug"]
[ext_resource type="PackedScene" uid="uid://dp7dvfauh5rpx" path="res://core/game_menu/collectible_ui.tscn" id="2_or234"]
[ext_resource type="PackedScene" uid="uid://dxun0jk5t0n6" path="res://core/tween/container_tween.tscn" id="3_cvqb8"]
[node name="CollectibleGallery" type="Control" unique_id=354419843]
layout_mode = 3
@@ -46,3 +47,6 @@ layout_mode = 2
[node name="CollectibleUI6" parent="ScrollContainer/CollectibleGrid" unique_id=1566830281 instance=ExtResource("2_or234")]
layout_mode = 2
[node name="ContainerTween" parent="." unique_id=160227524 node_paths=PackedStringArray("runtime_target_parent") instance=ExtResource("3_cvqb8")]
runtime_target_parent = NodePath("../ScrollContainer/CollectibleGrid")

View File

@@ -1,10 +1,8 @@
@tool
extends Control
extends Button
class_name TrainColorPicker
signal on_color_selected(color_picker: TrainColorPicker)
@export var image: Texture:
set(value):
image = value
@@ -23,18 +21,31 @@ func _ready():
color = img.get_pixel(0, 0)
else:
color = Color.BLACK
func _on_gui_input(event: InputEvent) -> void:
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
on_color_selected.emit(self)
$%Border.color.a = 0
func select() -> void:
if selected:
return
selected = true
$%Border.color.a = 1
TweenFX.press_rotate(self)
func deselect() -> void:
if !selected:
return
selected = false
$%Border.color.a = 0
func _on_mouse_entered() -> void:
if TweenFX.is_playing(self, TweenFX.Animations.BREATHE):
return
TweenFX.breathe(self, 1)
func _on_mouse_exited() -> void:
TweenFX.stop(self, TweenFX.Animations.BREATHE)
scale = Vector2(1, 1)

View File

@@ -2,56 +2,74 @@
[ext_resource type="Texture2D" uid="uid://cdjwvwst3f10a" path="res://core/game_menu/assets/page_1/customizecolor-1.png" id="1_us0rx"]
[ext_resource type="Script" uid="uid://crfw5whcjs0du" path="res://core/game_menu/color_picker.gd" id="2_323rd"]
[ext_resource type="PackedScene" uid="uid://dxun0jk5t0n6" path="res://core/game_menu/hoover_tween.tscn" id="3_264kt"]
[node name="ColorPicker" type="Control" unique_id=409505029]
custom_minimum_size = Vector2(53, 53)
layout_mode = 3
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_323rd"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_264kt"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1folt"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_tcqrg"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_kbu6n"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_dk0pr"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_f16cj"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_s4jbd"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_2ocph"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_5386i"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_6pmjh"]
[node name="ColorPicker" type="Button" unique_id=1664685328]
custom_minimum_size = Vector2(60, 60)
anchors_preset = -1
anchor_right = 0.03125
anchor_bottom = 0.055555556
pivot_offset_ratio = Vector2(0.5, 0.5)
theme_override_styles/normal = SubResource("StyleBoxEmpty_323rd")
theme_override_styles/normal_mirrored = SubResource("StyleBoxEmpty_264kt")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_1folt")
theme_override_styles/pressed_mirrored = SubResource("StyleBoxEmpty_tcqrg")
theme_override_styles/hover = SubResource("StyleBoxEmpty_kbu6n")
theme_override_styles/hover_mirrored = SubResource("StyleBoxEmpty_dk0pr")
theme_override_styles/hover_pressed = SubResource("StyleBoxEmpty_f16cj")
theme_override_styles/hover_pressed_mirrored = SubResource("StyleBoxEmpty_s4jbd")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_2ocph")
theme_override_styles/disabled_mirrored = SubResource("StyleBoxEmpty_5386i")
theme_override_styles/focus = SubResource("StyleBoxEmpty_6pmjh")
script = ExtResource("2_323rd")
image = ExtResource("1_us0rx")
metadata/_edit_use_anchors_ = true
[node name="Border" type="ColorRect" parent="." unique_id=1774696864]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("2_323rd")
image = ExtResource("1_us0rx")
[node name="Border" type="ColorRect" parent="." unique_id=1774696864]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -30.0
offset_top = -30.0
offset_right = 30.0
offset_bottom = 30.0
grow_horizontal = 2
grow_vertical = 2
pivot_offset_ratio = Vector2(0.5, 0.5)
mouse_filter = 2
[node name="Texture" type="TextureRect" parent="Border" unique_id=329703623]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -26.5
offset_top = -26.5
offset_right = 26.5
offset_bottom = 26.5
anchors_preset = -1
anchor_left = 0.058333334
anchor_top = 0.058333334
anchor_right = 0.94166666
anchor_bottom = 0.94166666
grow_horizontal = 2
grow_vertical = 2
pivot_offset_ratio = Vector2(0.5, 0.5)
mouse_filter = 2
texture = ExtResource("1_us0rx")
metadata/_edit_use_anchors_ = true
[node name="HooverTween" parent="." unique_id=160227524 node_paths=PackedStringArray("detector_node", "visual_node") instance=ExtResource("3_264kt")]
detector_node = NodePath("..")
visual_node = NodePath("../Border")
[connection signal="gui_input" from="." to="." method="_on_gui_input"]
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]
[connection signal="pressed" from="." to="." method="_on_pressed"]

View File

@@ -1,7 +1,8 @@
extends Control
@onready var tabs: Array[GameMenuTab] = [$%Tab1, $%Tab2, $%Tab3]
@onready var pages: Array[Control] = [$%Page1, $%Page2, $%Page3]
@onready var pages: Array[GameMenuPage] = [$%Page1, $%Page2, $%Page3]
func _ready() -> void:
for tab: GameMenuTab in tabs:
@@ -11,7 +12,7 @@ func _ready() -> void:
func on_tab_pressed(index: int, disable_animation: bool = false) -> void:
for page in pages:
page.hide()
page.hide_page()
for tab in tabs:
if tab.index == index:
@@ -25,7 +26,4 @@ func on_tab_pressed(index: int, disable_animation: bool = false) -> void:
else:
tab.deselect()
pages[index].show()
func _on_resume_button_on_button_pressed() -> void:
hide()
pages[index].show_page()

View File

@@ -17,17 +17,10 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
pivot_offset_ratio = Vector2(0.5, 0.5)
mouse_filter = 2
script = ExtResource("1_57vaj")
[node name="Panel" type="Panel" parent="." unique_id=992567199]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Tabs" type="HBoxContainer" parent="." unique_id=1745270897]
layout_mode = 1
offset_left = 1138.0
@@ -84,7 +77,5 @@ unique_name_in_owner = true
visible = false
layout_mode = 1
[connection signal="on_button_pressed" from="Pages/Page3/OptionMenu/VBoxContainer/ResumeButton" to="." method="_on_resume_button_on_button_pressed"]
[editable path="Pages/Page3"]
[editable path="Pages/Page3/OptionMenu"]

View File

@@ -25,6 +25,8 @@ func _ready():
func _on_gui_input(event: InputEvent) -> void:
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
if is_selected:
return
on_tab_selected.emit(index)
func select():

View File

@@ -3,16 +3,21 @@ extends Control
@onready var photo: Photo = $%Photo
@onready var panel: Panel = $%Panel
func _ready() -> void:
GameState.on_photo_highlighted.connect(_on_photo_highlighted)
func _on_photo_highlighted(texture: Texture) -> void:
if texture != photo.texture_rect.texture:
show()
photo.scale = Vector2.ONE
TweenFX.fold_in(photo)
photo.setup(texture)
func _on_panel_gui_input(event: InputEvent) -> void:
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
await TweenFX.fold_out(photo).finished
photo.texture_rect.texture = null
hide()

View File

@@ -24,20 +24,14 @@ grow_vertical = 2
[node name="Photo" parent="." unique_id=201865221 instance=ExtResource("1_x7ou0")]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = -1
anchor_left = 0.3625
anchor_top = 0.14351852
anchor_right = 0.6375
anchor_bottom = 0.8564815
mouse_filter = 2
metadata/_edit_use_anchors_ = true
[node name="ColorRect" parent="Photo" index="0" unique_id=1208008621]
anchors_preset = 15
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 0.0
offset_top = 0.0
offset_right = 0.0

View File

@@ -1,44 +0,0 @@
extends Node
@export_group("Settings")
@export var always_active: bool = false
@export var detector_node: Control
@export var visual_node: Control
@export var scale_amount: Vector2 = Vector2(1.1, 1.1)
@export var duration: float = 0.5
var hover_tween: Tween
func _ready():
if not detector_node or not visual_node:
return
if always_active:
_start_tween()
return
detector_node.mouse_entered.connect(_on_mouse_entered)
detector_node.mouse_exited.connect(_on_mouse_exited)
func _on_mouse_entered():
if hover_tween: hover_tween.kill()
_start_tween()
func _on_mouse_exited():
if hover_tween: hover_tween.kill()
_stop_tween()
func _start_tween() -> void:
hover_tween = create_tween().set_loops()
hover_tween.tween_property(visual_node, "scale", scale_amount, duration).set_trans(Tween.TRANS_SINE)
hover_tween.tween_property(visual_node, "scale", Vector2.ONE, duration).set_trans(Tween.TRANS_SINE)
func _stop_tween() -> void:
var exit_tween = create_tween()
exit_tween.tween_property(visual_node, "scale", Vector2.ONE, 0.2).set_trans(Tween.TRANS_QUAD)

View File

@@ -1,6 +0,0 @@
[gd_scene format=3 uid="uid://dxun0jk5t0n6"]
[ext_resource type="Script" uid="uid://ryxh3nm7ayvf" path="res://core/game_menu/hoover_tween.gd" id="1_gmaf4"]
[node name="HooverTween" type="Node" unique_id=160227524]
script = ExtResource("1_gmaf4")

View File

@@ -1,16 +1,31 @@
extends Control
@onready var play_button: Control = $%PlayButton
@onready var resume_button: Control = $%ResumeButton
@onready var play_button: Button = $%PlayButton
@onready var resume_button: Button = $%ResumeButton
@onready var settings_button: Button = $%SettingsButton
@onready var save_button: Button = $%SaveButton
@onready var quit_button: Button = $%QuitButton
@onready var show_container_tween: ContainerTween = $%ShowContainerTween
@onready var hide_container_tween: ContainerTween = $%HideContainerTween
func _ready() -> void:
play_button.pressed.connect(_on_play_button_pressed)
settings_button.pressed.connect(_on_settings_button_pressed)
save_button.pressed.connect(_on_save_button_pressed)
quit_button.pressed.connect(_on_quit_button_pressed)
func _on_resume_button_on_button_pressed() -> void:
GameState.resume_game()
func _on_play_button_pressed() -> void:
SceneManager.change_scene(SceneConfig.SceneName.GAME)
func _on_save_button_on_button_pressed() -> void:
func _on_save_button_pressed() -> void:
GameState.save_game()
func _on_quit_button_on_button_pressed() -> void:
func _on_quit_button_pressed() -> void:
GameState.quit_game()
func _on_settings_button_pressed() -> void:
if $%SettingsMenu.visible:
hide_container_tween.start_tween()
else:
show_container_tween.start_tween()

View File

@@ -6,6 +6,7 @@
[ext_resource type="Texture2D" uid="uid://cmhx3mscwrwft" path="res://core/game_menu/assets/page_3/save_button.png" id="3_vwpol"]
[ext_resource type="Texture2D" uid="uid://cu8e7pl0y4owq" path="res://core/game_menu/assets/page_3/settings_button.png" id="4_8w45m"]
[ext_resource type="Texture2D" uid="uid://v7e7467fkdec" path="res://core/game_menu/assets/page_3/quit_button.png" id="4_cd2sv"]
[ext_resource type="PackedScene" uid="uid://dxun0jk5t0n6" path="res://core/tween/container_tween.tscn" id="7_n7rb8"]
[node name="OptionMenu" type="Control" unique_id=1055457221]
layout_mode = 3
@@ -61,6 +62,5 @@ custom_minimum_size = Vector2(310, 100)
layout_mode = 2
image = ExtResource("4_cd2sv")
[connection signal="on_button_pressed" from="VBoxContainer/ResumeButton" to="." method="_on_resume_button_on_button_pressed"]
[connection signal="on_button_pressed" from="VBoxContainer/SaveButton" to="." method="_on_save_button_on_button_pressed"]
[connection signal="on_button_pressed" from="VBoxContainer/QuitButton" to="." method="_on_quit_button_on_button_pressed"]
[node name="ContainerTween" parent="." unique_id=160227524 node_paths=PackedStringArray("targets") instance=ExtResource("7_n7rb8")]
targets = [NodePath("../VBoxContainer/PlayButton"), NodePath("../VBoxContainer/ResumeButton"), NodePath("../VBoxContainer/SettingsButton"), NodePath("../VBoxContainer/SaveButton"), NodePath("../VBoxContainer/QuitButton")]

View File

@@ -1,7 +1,5 @@
@tool
extends Control
signal on_button_pressed
extends Button
@export var image: Texture:
set(value):
@@ -13,6 +11,19 @@ func _ready():
if image != null and has_node("%Texture"):
$%Texture.texture = image
func _on_gui_input(event: InputEvent) -> void:
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
on_button_pressed.emit()
func _on_pressed() -> void:
if TweenFX.is_playing(self, TweenFX.Animations.PUNCH_IN):
return
TweenFX.punch_in(self)
func _on_mouse_entered() -> void:
if TweenFX.is_playing(self, TweenFX.Animations.BREATHE):
return
TweenFX.breathe(self, 1)
func _on_mouse_exited() -> void:
TweenFX.stop(self, TweenFX.Animations.BREATHE)
scale = Vector2(1, 1)

View File

@@ -2,17 +2,50 @@
[ext_resource type="Texture2D" uid="uid://b4nymq3n3468g" path="res://core/game_menu/assets/page_3/play_button.png" id="1_movd1"]
[ext_resource type="Script" uid="uid://bbhe65f3517m8" path="res://core/game_menu/option_menu_button.gd" id="2_nghpi"]
[ext_resource type="PackedScene" uid="uid://dxun0jk5t0n6" path="res://core/game_menu/hoover_tween.tscn" id="3_am666"]
[node name="OptionMenuButton" type="Control" unique_id=635721927]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_nghpi"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_am666"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_nxt2x"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_r4tfe"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1kmlt"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_51x11"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_8eh6p"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_w4k7x"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_wra0p"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_8dgkg"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ev2fk"]
[node name="OptionMenuButton" type="Button" unique_id=600844315]
process_mode = 3
custom_minimum_size = Vector2(302, 90)
anchors_preset = -1
anchor_right = 0.15729167
anchor_bottom = 0.083333336
pivot_offset_ratio = Vector2(0.5, 0.5)
theme_override_styles/normal = SubResource("StyleBoxEmpty_nghpi")
theme_override_styles/normal_mirrored = SubResource("StyleBoxEmpty_am666")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_nxt2x")
theme_override_styles/pressed_mirrored = SubResource("StyleBoxEmpty_r4tfe")
theme_override_styles/hover = SubResource("StyleBoxEmpty_1kmlt")
theme_override_styles/hover_mirrored = SubResource("StyleBoxEmpty_51x11")
theme_override_styles/hover_pressed = SubResource("StyleBoxEmpty_8eh6p")
theme_override_styles/hover_pressed_mirrored = SubResource("StyleBoxEmpty_w4k7x")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_wra0p")
theme_override_styles/disabled_mirrored = SubResource("StyleBoxEmpty_8dgkg")
theme_override_styles/focus = SubResource("StyleBoxEmpty_ev2fk")
script = ExtResource("2_nghpi")
image = ExtResource("1_movd1")
metadata/_edit_use_anchors_ = true
[node name="Texture" type="TextureRect" parent="." unique_id=1177880405]
unique_name_in_owner = true
@@ -29,8 +62,6 @@ mouse_filter = 2
texture = ExtResource("1_movd1")
metadata/_edit_use_anchors_ = true
[node name="HooverTween" parent="." unique_id=160227524 node_paths=PackedStringArray("detector_node", "visual_node") instance=ExtResource("3_am666")]
detector_node = NodePath("..")
visual_node = NodePath("../Texture")
[connection signal="gui_input" from="." to="." method="_on_gui_input"]
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]
[connection signal="pressed" from="." to="." method="_on_pressed"]

14
core/game_menu/page.gd Normal file
View File

@@ -0,0 +1,14 @@
extends Control
class_name GameMenuPage
func show_page() -> void:
var tweens = find_children("*", "ContainerTween", true, false)
for tween in tweens:
tween.start_tween()
show()
func hide_page() -> void:
hide()

View File

@@ -0,0 +1 @@
uid://dup0tdvb3eghp

View File

@@ -1,5 +1,6 @@
[gd_scene format=3 uid="uid://id854u4gh12f"]
[ext_resource type="Script" uid="uid://dup0tdvb3eghp" path="res://core/game_menu/page.gd" id="1_21t5y"]
[ext_resource type="Texture2D" uid="uid://bs56pdbywm4uh" path="res://core/game_menu/assets/page_1/quad_main.png" id="1_jwl25"]
[node name="Page" type="Control" unique_id=2037261222]
@@ -7,6 +8,7 @@ layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
script = ExtResource("1_21t5y")
[node name="Background" type="TextureRect" parent="." unique_id=1203110384]
visible = false

View File

@@ -2,8 +2,6 @@
[ext_resource type="PackedScene" uid="uid://id854u4gh12f" path="res://core/game_menu/page.tscn" id="1_uxih6"]
[ext_resource type="PackedScene" uid="uid://bh1kxsp5jyxfx" path="res://core/game_menu/train_selector.tscn" id="3_ijm38"]
[ext_resource type="Texture2D" uid="uid://bjqp8kmb5y7px" path="res://core/game_menu/assets/page_1/chooseyourtrain_text.png" id="3_t5hmd"]
[ext_resource type="Texture2D" uid="uid://dqqnfnero7ckl" path="res://core/game_menu/assets/page_1/chooseyourbiome_text.png" id="11_3chbu"]
[ext_resource type="PackedScene" uid="uid://bc60gon7fmvbr" path="res://core/game_menu/biome_selector.tscn" id="12_7yi8x"]
[node name="Page1" unique_id=2037261222 instance=ExtResource("1_uxih6")]
@@ -16,33 +14,16 @@ grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
[node name="ChooseyourtrainText" type="TextureRect" parent="." index="1" unique_id=1883940124]
layout_mode = 0
offset_left = 350.0
offset_top = 365.0
offset_right = 758.0
offset_bottom = 445.0
texture = ExtResource("3_t5hmd")
[node name="TrainSelector" parent="." index="2" unique_id=1039769375 instance=ExtResource("3_ijm38")]
[node name="TrainSelector" parent="." index="1" unique_id=1039769375 instance=ExtResource("3_ijm38")]
layout_mode = 0
offset_left = 211.0
offset_top = 469.0
offset_right = 871.0
offset_bottom = 778.0
[node name="ChooseyourbiomeText" type="TextureRect" parent="." index="3" unique_id=1133714914]
layout_mode = 0
offset_left = 1184.0
offset_top = 365.0
offset_right = 1579.0
offset_bottom = 436.0
texture = ExtResource("11_3chbu")
stretch_mode = 3
offset_right = 871.0
offset_bottom = 758.0
[node name="BiomeSelector" parent="." index="4" unique_id=1957954960 instance=ExtResource("12_7yi8x")]
[node name="BiomeSelector" parent="." index="2" unique_id=1957954960 instance=ExtResource("12_7yi8x")]
layout_mode = 0
offset_left = 1038.0
offset_top = 437.0
offset_top = 365.0
offset_right = 1738.0
offset_bottom = 837.0
offset_bottom = 783.0

View File

@@ -17,9 +17,6 @@ grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
[node name="Background" parent="." index="0" unique_id=1203110384]
mouse_filter = 2
[node name="PhotoCollectionText" type="TextureRect" parent="." index="1" unique_id=240014191]
layout_mode = 0
offset_left = 350.0
@@ -43,7 +40,7 @@ layout_mode = 1
offset_left = 244.0
offset_top = 410.0
offset_right = 844.0
offset_bottom = 810.0
offset_bottom = 850.0
[node name="CollectibleGallery" parent="." index="4" unique_id=708445500 instance=ExtResource("5_w0bcg")]
layout_mode = 1

View File

@@ -1,4 +1,4 @@
extends Control
extends Button
class_name Photo
@@ -11,6 +11,20 @@ func setup(texture: Texture) -> void:
texture_rect.texture = texture
func _on_gui_input(event: InputEvent) -> void:
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
func _on_pressed() -> void:
if TweenFX.is_playing(self, TweenFX.Animations.PUNCH_IN):
return
TweenFX.punch_in(self)
GameState.on_photo_highlighted.emit(texture_rect.texture)
func _on_mouse_entered() -> void:
if TweenFX.is_playing(self, TweenFX.Animations.BREATHE):
return
TweenFX.breathe(self, 1)
func _on_mouse_exited() -> void:
TweenFX.stop(self, TweenFX.Animations.BREATHE)
scale = Vector2(1, 1)

View File

@@ -1,29 +1,26 @@
[gd_scene format=3 uid="uid://cvus62qkop3qi"]
[ext_resource type="Script" uid="uid://dsey5dvc11vpq" path="res://core/game_menu/photo.gd" id="1_u0arp"]
[ext_resource type="PackedScene" uid="uid://dxun0jk5t0n6" path="res://core/game_menu/hoover_tween.tscn" id="2_62vvn"]
[node name="Photo" type="Control" unique_id=201865221]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Photo" type="Button" unique_id=1451980505]
custom_minimum_size = Vector2(132, 154)
anchors_preset = -1
anchor_right = 0.06875
anchor_bottom = 0.1425926
pivot_offset_ratio = Vector2(0.5, 0.5)
script = ExtResource("1_u0arp")
metadata/_edit_use_anchors_ = true
[node name="ColorRect" type="ColorRect" parent="." unique_id=1208008621]
custom_minimum_size = Vector2(132, 154)
layout_mode = 1
anchors_preset = -1
anchor_left = 0.465625
anchor_top = 0.4287037
anchor_right = 0.534375
anchor_bottom = 0.5712963
offset_left = 66.0
offset_top = 77.0
offset_right = -66.0
offset_bottom = -77.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 127.462494
offset_top = 143.02037
offset_right = -127.4625
offset_bottom = -143.02037
grow_horizontal = 2
grow_vertical = 2
pivot_offset_ratio = Vector2(0.5, 0.5)
@@ -50,8 +47,6 @@ mouse_filter = 2
expand_mode = 1
stretch_mode = 6
[node name="HooverTween" parent="." unique_id=160227524 node_paths=PackedStringArray("detector_node", "visual_node") instance=ExtResource("2_62vvn")]
detector_node = NodePath("..")
visual_node = NodePath("../ColorRect")
[connection signal="gui_input" from="." to="." method="_on_gui_input"]
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]
[connection signal="pressed" from="." to="." method="_on_pressed"]

View File

@@ -2,12 +2,13 @@
[ext_resource type="Script" uid="uid://k4iqrlkbjppl" path="res://core/game_menu/photo_gallery.gd" id="1_bp5uf"]
[ext_resource type="PackedScene" uid="uid://cvus62qkop3qi" path="res://core/game_menu/photo.tscn" id="2_45wok"]
[ext_resource type="PackedScene" uid="uid://dxun0jk5t0n6" path="res://core/tween/container_tween.tscn" id="3_ht2y6"]
[node name="PhotoGallery" type="Control" unique_id=354419843]
layout_mode = 3
anchors_preset = 0
offset_right = 600.0
offset_bottom = 420.0
offset_bottom = 440.0
mouse_filter = 2
script = ExtResource("1_bp5uf")
photo_scene = ExtResource("2_45wok")
@@ -21,35 +22,40 @@ grow_horizontal = 2
grow_vertical = 2
draw_focus_border = true
[node name="PhotoGrid" type="GridContainer" parent="ScrollContainer" unique_id=1187865988]
unique_name_in_owner = true
[node name="MarginContainer" type="MarginContainer" parent="ScrollContainer" unique_id=934979837]
layout_mode = 2
size_flags_horizontal = 6
size_flags_vertical = 6
theme_override_constants/margin_left = 32
theme_override_constants/margin_top = 32
theme_override_constants/margin_right = 32
theme_override_constants/margin_bottom = 33
[node name="PhotoGrid" type="GridContainer" parent="ScrollContainer/MarginContainer" unique_id=1187865988]
unique_name_in_owner = true
layout_mode = 2
theme_override_constants/h_separation = 44
theme_override_constants/v_separation = 54
columns = 3
[node name="Photo" parent="ScrollContainer/PhotoGrid" unique_id=201865221 instance=ExtResource("2_45wok")]
custom_minimum_size = Vector2(132, 154)
[node name="Photo" parent="ScrollContainer/MarginContainer/PhotoGrid" unique_id=201865221 instance=ExtResource("2_45wok")]
layout_mode = 2
[node name="Photo2" parent="ScrollContainer/PhotoGrid" unique_id=427039285 instance=ExtResource("2_45wok")]
custom_minimum_size = Vector2(132, 154)
[node name="Photo2" parent="ScrollContainer/MarginContainer/PhotoGrid" unique_id=427039285 instance=ExtResource("2_45wok")]
layout_mode = 2
[node name="Photo3" parent="ScrollContainer/PhotoGrid" unique_id=800591401 instance=ExtResource("2_45wok")]
custom_minimum_size = Vector2(132, 154)
[node name="Photo3" parent="ScrollContainer/MarginContainer/PhotoGrid" unique_id=800591401 instance=ExtResource("2_45wok")]
layout_mode = 2
[node name="Photo4" parent="ScrollContainer/PhotoGrid" unique_id=1895298585 instance=ExtResource("2_45wok")]
custom_minimum_size = Vector2(132, 154)
[node name="Photo4" parent="ScrollContainer/MarginContainer/PhotoGrid" unique_id=1895298585 instance=ExtResource("2_45wok")]
layout_mode = 2
[node name="Photo5" parent="ScrollContainer/PhotoGrid" unique_id=2093353381 instance=ExtResource("2_45wok")]
custom_minimum_size = Vector2(132, 154)
[node name="Photo5" parent="ScrollContainer/MarginContainer/PhotoGrid" unique_id=2093353381 instance=ExtResource("2_45wok")]
layout_mode = 2
[node name="Photo6" parent="ScrollContainer/PhotoGrid" unique_id=316021755 instance=ExtResource("2_45wok")]
custom_minimum_size = Vector2(132, 154)
[node name="Photo6" parent="ScrollContainer/MarginContainer/PhotoGrid" unique_id=316021755 instance=ExtResource("2_45wok")]
layout_mode = 2
[node name="ContainerTween" parent="." unique_id=160227524 node_paths=PackedStringArray("runtime_target_parent") instance=ExtResource("3_ht2y6")]
unique_name_in_owner = true
runtime_target_parent = NodePath("../ScrollContainer/MarginContainer/PhotoGrid")

View File

@@ -4,20 +4,30 @@
[ext_resource type="PackedScene" uid="uid://cescrovsjlwke" path="res://core/game_menu/audio_option.tscn" id="1_hwcco"]
[ext_resource type="Texture2D" uid="uid://0t00kjvrw206" path="res://core/game_menu/assets/page_3/music_volume_button.png" id="3_kgdba"]
[ext_resource type="Texture2D" uid="uid://dvergpy6qgggn" path="res://core/game_menu/assets/page_3/sfx_volume_button.png" id="4_ugk4n"]
[ext_resource type="PackedScene" uid="uid://dxun0jk5t0n6" path="res://core/tween/container_tween.tscn" id="5_p0gqk"]
[node name="SettingsMenu" type="Control" unique_id=1639777294]
custom_minimum_size = Vector2(327, 512)
layout_mode = 3
anchors_preset = 0
offset_right = 600.0
offset_bottom = 420.0
anchor_right = 0.1703125
anchor_bottom = 0.47407407
offset_right = -327.0
offset_bottom = -512.0
pivot_offset_ratio = Vector2(0.5, 0.5)
script = ExtResource("1_4lekq")
metadata/_edit_use_anchors_ = true
[node name="AudioOptionsContainer" type="VBoxContainer" parent="." unique_id=743642398]
unique_name_in_owner = true
layout_mode = 0
offset_right = 327.0
offset_bottom = 512.0
custom_minimum_size = Vector2(327, 512)
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/separation = 12
alignment = 1
[node name="MasterVolume_AudioOption" parent="AudioOptionsContainer" unique_id=1509773712 instance=ExtResource("1_hwcco")]
layout_mode = 2
@@ -31,3 +41,6 @@ bus_name = &"Music"
layout_mode = 2
image = ExtResource("4_ugk4n")
bus_name = &"SFX"
[node name="ContainerTween" parent="." unique_id=160227524 node_paths=PackedStringArray("targets") instance=ExtResource("5_p0gqk")]
targets = [NodePath("../AudioOptionsContainer/MasterVolume_AudioOption"), NodePath("../AudioOptionsContainer/MusicVolume_AudioOption"), NodePath("../AudioOptionsContainer/SFXVolume_AudioOption")]

View File

@@ -3,19 +3,20 @@ extends VBoxContainer
@onready var color_pickers: Array[TrainColorPicker] = [$%ColorPicker1, $%ColorPicker2, $%ColorPicker3, $%ColorPicker4, $%ColorPicker5, $%ColorPicker6]
@onready var left_arrow: ArrowButton = $%ArrowButtonLeft
@onready var right_arrow: ArrowButton = $%ArrowButtonRight
var selected_color: Color
var selected_color_index: int = 0
func _ready() -> void:
for color_picker in color_pickers:
color_picker.on_color_selected.connect(_on_color_selected)
color_picker.pressed.connect(_on_color_selected.bind(color_picker))
color_picker.deselect()
selected_color = color_pickers[0].color
color_pickers[0].select()
left_arrow.on_pressed.connect(_select_prev_color)
right_arrow.on_pressed.connect(_select_next_color)
left_arrow.pressed.connect(_select_prev_color)
right_arrow.pressed.connect(_select_next_color)
func _on_color_selected(selected_color_picker: TrainColorPicker) -> void:
for i in range(color_pickers.size()):

View File

@@ -2,6 +2,7 @@
[ext_resource type="Script" uid="uid://8k1msabobhks" path="res://core/game_menu/train_selector.gd" id="1_puip6"]
[ext_resource type="Texture2D" uid="uid://cqvani6n2h3fw" path="res://core/game_menu/assets/page_1/train_texture.png" id="1_wfiis"]
[ext_resource type="Texture2D" uid="uid://bjqp8kmb5y7px" path="res://core/game_menu/assets/page_1/chooseyourtrain_text.png" id="2_cfvtr"]
[ext_resource type="PackedScene" uid="uid://dm3skv22c60tm" path="res://core/game_menu/arrow_button.tscn" id="2_puip6"]
[ext_resource type="PackedScene" uid="uid://ch1st1oryjoio" path="res://core/game_menu/color_picker.tscn" id="3_i2rs1"]
[ext_resource type="Texture2D" uid="uid://b5arobd7gl4u4" path="res://core/game_menu/assets/page_1/customizecolor-3.png" id="4_cfvtr"]
@@ -9,19 +10,31 @@
[ext_resource type="Texture2D" uid="uid://bv07xhpe3kh0r" path="res://core/game_menu/assets/page_1/customizecolor-5.png" id="6_dxnpq"]
[ext_resource type="Texture2D" uid="uid://cryqbi1av2x1c" path="res://core/game_menu/assets/page_1/customizecolor.png" id="7_d1sdr"]
[ext_resource type="Texture2D" uid="uid://d4l5ih723j3md" path="res://core/game_menu/assets/page_1/customizecolor-2.png" id="8_tuh6m"]
[ext_resource type="PackedScene" uid="uid://dxun0jk5t0n6" path="res://core/tween/container_tween.tscn" id="10_i2rs1"]
[node name="TrainSelector" type="VBoxContainer" unique_id=1039769375]
offset_right = 625.0
offset_bottom = 309.0
alignment = 1
script = ExtResource("1_puip6")
[node name="TrainTexture" type="TextureRect" parent="." unique_id=2095010706]
[node name="ChooseYourTrainTexture" type="TextureRect" parent="." unique_id=2095010706]
layout_mode = 2
texture = ExtResource("2_cfvtr")
stretch_mode = 3
[node name="Spacer" type="Control" parent="." unique_id=685700140]
custom_minimum_size = Vector2(0, 30)
layout_mode = 2
[node name="TrainTexture" type="TextureRect" parent="." unique_id=1674220600]
layout_mode = 2
texture = ExtResource("1_wfiis")
stretch_mode = 3
[node name="HBoxContainer2" type="HBoxContainer" parent="." unique_id=607833319]
layout_mode = 2
alignment = 1
[node name="ArrowButtonLeft" parent="HBoxContainer2" unique_id=103192648 instance=ExtResource("2_puip6")]
unique_name_in_owner = true
@@ -31,44 +44,39 @@ flip_h = true
[node name="HBoxContainer" type="HBoxContainer" parent="HBoxContainer2" unique_id=1364417494]
layout_mode = 2
theme_override_constants/separation = 18
alignment = 1
[node name="ColorPicker1" parent="HBoxContainer2/HBoxContainer" unique_id=59169767 instance=ExtResource("3_i2rs1")]
unique_name_in_owner = true
custom_minimum_size = Vector2(60, 60)
layout_mode = 2
size_flags_vertical = 4
image = ExtResource("4_cfvtr")
[node name="ColorPicker2" parent="HBoxContainer2/HBoxContainer" unique_id=584054476 instance=ExtResource("3_i2rs1")]
unique_name_in_owner = true
custom_minimum_size = Vector2(60, 60)
layout_mode = 2
size_flags_vertical = 4
image = ExtResource("5_jnto8")
[node name="ColorPicker3" parent="HBoxContainer2/HBoxContainer" unique_id=889429149 instance=ExtResource("3_i2rs1")]
unique_name_in_owner = true
custom_minimum_size = Vector2(60, 60)
layout_mode = 2
size_flags_vertical = 4
image = ExtResource("6_dxnpq")
[node name="ColorPicker4" parent="HBoxContainer2/HBoxContainer" unique_id=466686411 instance=ExtResource("3_i2rs1")]
unique_name_in_owner = true
custom_minimum_size = Vector2(60, 60)
layout_mode = 2
size_flags_vertical = 4
image = ExtResource("7_d1sdr")
[node name="ColorPicker5" parent="HBoxContainer2/HBoxContainer" unique_id=675841518 instance=ExtResource("3_i2rs1")]
unique_name_in_owner = true
custom_minimum_size = Vector2(60, 60)
layout_mode = 2
size_flags_vertical = 4
[node name="ColorPicker6" parent="HBoxContainer2/HBoxContainer" unique_id=1698412911 instance=ExtResource("3_i2rs1")]
unique_name_in_owner = true
custom_minimum_size = Vector2(60, 60)
layout_mode = 2
size_flags_vertical = 4
image = ExtResource("8_tuh6m")
@@ -76,3 +84,7 @@ image = ExtResource("8_tuh6m")
[node name="ArrowButtonRight" parent="HBoxContainer2" unique_id=68298624 instance=ExtResource("2_puip6")]
unique_name_in_owner = true
layout_mode = 2
[node name="ContainerTween" parent="." unique_id=160227524 node_paths=PackedStringArray("targets") instance=ExtResource("10_i2rs1")]
unique_name_in_owner = true
targets = [NodePath("../HBoxContainer2/ArrowButtonLeft"), NodePath("../HBoxContainer2/HBoxContainer/ColorPicker1"), NodePath("../HBoxContainer2/HBoxContainer/ColorPicker2"), NodePath("../HBoxContainer2/HBoxContainer/ColorPicker3"), NodePath("../HBoxContainer2/HBoxContainer/ColorPicker4"), NodePath("../HBoxContainer2/HBoxContainer/ColorPicker5"), NodePath("../HBoxContainer2/HBoxContainer/ColorPicker6"), NodePath("../HBoxContainer2/ArrowButtonRight")]

View File

@@ -1,10 +0,0 @@
extends Control
@onready var settings_menu: Control = $%SettingsMenu
func _on_play_button_on_button_pressed() -> void:
SceneManager.change_scene(SceneConfig.SceneName.GAME)
func _on_settings_button_on_button_pressed() -> void:
$%SettingsMenu.visible = !$%SettingsMenu.visible

View File

@@ -1 +0,0 @@
uid://csqxuftsnv1br

View File

@@ -1,9 +1,9 @@
[gd_scene format=3 uid="uid://btcpge7cj2041"]
[ext_resource type="Script" uid="uid://csqxuftsnv1br" path="res://core/main_menu/main_menu.gd" id="1_g1whv"]
[ext_resource type="PackedScene" uid="uid://cxf8s80ivwj1p" path="res://core/game_menu/option_menu.tscn" id="1_uvy4f"]
[ext_resource type="Texture2D" uid="uid://buy4x63u237np" path="res://core/main_menu/assets/main_menu_background.png" id="2_mloc8"]
[ext_resource type="PackedScene" uid="uid://caqf471x0kttc" path="res://core/game_menu/settings_menu.tscn" id="3_26agx"]
[ext_resource type="PackedScene" uid="uid://dxun0jk5t0n6" path="res://core/tween/container_tween.tscn" id="4_mloc8"]
[node name="MainMenu" type="Control" unique_id=889720172]
layout_mode = 3
@@ -12,7 +12,6 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_g1whv")
[node name="TextureRect" type="TextureRect" parent="." unique_id=11805511]
layout_mode = 1
@@ -25,15 +24,13 @@ texture = ExtResource("2_mloc8")
[node name="OptionMenu" parent="." unique_id=1055457221 instance=ExtResource("1_uvy4f")]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 492.0
offset_top = 274.0
offset_right = 492.0
offset_bottom = 274.0
offset_left = -294.0
offset_right = -294.0
grow_horizontal = 0
[node name="VBoxContainer" parent="OptionMenu" index="0" unique_id=508055524]
anchor_top = 0.3037037
@@ -51,12 +48,26 @@ visible = false
unique_name_in_owner = true
visible = false
layout_mode = 1
offset_left = 639.0
offset_top = 566.0
offset_right = 639.0
offset_bottom = 566.0
anchors_preset = 4
anchor_top = 0.5
anchor_right = 0.0
anchor_bottom = 0.5
offset_left = 225.0
offset_top = -256.0
offset_right = 552.0
offset_bottom = 256.0
grow_vertical = 2
[connection signal="on_button_pressed" from="OptionMenu/VBoxContainer/PlayButton" to="." method="_on_play_button_on_button_pressed"]
[connection signal="on_button_pressed" from="OptionMenu/VBoxContainer/SettingsButton" to="." method="_on_settings_button_on_button_pressed"]
[node name="ShowContainerTween" parent="." unique_id=160227524 node_paths=PackedStringArray("targets") instance=ExtResource("4_mloc8")]
unique_name_in_owner = true
targets = [NodePath("../SettingsMenu")]
tween_types = Array[String](["fold_in"])
show_on_start = true
[node name="HideContainerTween" parent="." unique_id=570405239 node_paths=PackedStringArray("targets") instance=ExtResource("4_mloc8")]
unique_name_in_owner = true
targets = [NodePath("../SettingsMenu")]
tween_types = Array[String](["fold_out"])
hide_on_finish = true
[editable path="OptionMenu"]

View File

@@ -3,8 +3,18 @@ extends Control
@export var radio: Radio
@onready var track_label: Label = $%TrackLabel
@onready var prev_track_icon_button: Button = $%PrevTrackIconButton
@onready var play_pause_icon_button: Button = $%PlayPauseIconButton
@onready var next_track_icon_button: Button = $%NextTrackIconButton
@onready var increase_volume_icon_button: Button = $%IncreaseVolumeIconButton
@onready var decrease_volume_icon_button: Button = $%DecreaseVolumeIconButton
func _ready() -> void:
prev_track_icon_button.pressed.connect(_on_prev_track_icon_button_pressed)
play_pause_icon_button.pressed.connect(_on_play_pause_icon_button_pressed)
next_track_icon_button.pressed.connect(_on_next_track_icon_button_pressed)
increase_volume_icon_button.pressed.connect(_on_increase_volume_icon_button_pressed)
decrease_volume_icon_button.pressed.connect(_on_decrease_volume_icon_button_pressed)
if radio:
radio.track_changed.connect(_on_radio_track_changed)
if radio.stream and radio.stream.resource_path:
@@ -15,29 +25,25 @@ func _ready() -> void:
func _on_radio_track_changed(track_name: String) -> void:
track_label.text = track_name
func _on_prev_track_icon_button_on_pressed() -> void:
func _on_prev_track_icon_button_pressed() -> void:
if radio:
radio.prev_track()
func _on_play_pause_icon_button_on_pressed() -> void:
func _on_play_pause_icon_button_pressed() -> void:
radio.toggle_pause()
#if radio.stream_paused:
#button_pause_resume.text = "Resume"
#else:
#button_pause_resume.text = "Pause"
func _on_next_track_icon_button_on_pressed() -> void:
func _on_next_track_icon_button_pressed() -> void:
if radio:
radio.next_track()
func _on_increase_volume_icon_button_on_pressed() -> void:
func _on_increase_volume_icon_button_pressed() -> void:
var current_vol = AudioManager.get_audio_bus_volume("Music", 1.0)
AudioManager.set_audio_bus_volume("Music", current_vol + 0.1)
func _on_decrease_volume_icon_button_on_pressed() -> void:
func _on_decrease_volume_icon_button_pressed() -> void:
var current_vol = AudioManager.get_audio_bus_volume("Music", 1.0)
AudioManager.set_audio_bus_volume("Music", current_vol - 0.1)

View File

@@ -89,6 +89,7 @@ layout_mode = 2
size_flags_vertical = 4
[node name="IncreaseVolumeIconButton" parent="HBoxContainer/VBoxContainer2" unique_id=1788399963 instance=ExtResource("1_ucnyb")]
unique_name_in_owner = true
custom_minimum_size = Vector2(40, 40)
layout_mode = 2
size_flags_horizontal = 0
@@ -106,6 +107,7 @@ offset_right = -96.666664
offset_bottom = -92.64813
[node name="DecreaseVolumeIconButton" parent="HBoxContainer/VBoxContainer2" unique_id=399629327 instance=ExtResource("1_ucnyb")]
unique_name_in_owner = true
custom_minimum_size = Vector2(40, 40)
layout_mode = 2
size_flags_horizontal = 0
@@ -122,12 +124,6 @@ offset_top = 92.64813
offset_right = -96.666664
offset_bottom = -92.64813
[connection signal="on_pressed" from="HBoxContainer/VBoxContainer/IconButtonsRow/PrevTrackIconButton" to="." method="_on_prev_track_icon_button_on_pressed"]
[connection signal="on_pressed" from="HBoxContainer/VBoxContainer/IconButtonsRow/PlayPauseIconButton" to="." method="_on_play_pause_icon_button_on_pressed"]
[connection signal="on_pressed" from="HBoxContainer/VBoxContainer/IconButtonsRow/NextTrackIconButton" to="." method="_on_next_track_icon_button_on_pressed"]
[connection signal="on_pressed" from="HBoxContainer/VBoxContainer2/IncreaseVolumeIconButton" to="." method="_on_increase_volume_icon_button_on_pressed"]
[connection signal="on_pressed" from="HBoxContainer/VBoxContainer2/DecreaseVolumeIconButton" to="." method="_on_decrease_volume_icon_button_on_pressed"]
[editable path="HBoxContainer/VBoxContainer/IconButtonsRow/PrevTrackIconButton"]
[editable path="HBoxContainer/VBoxContainer/IconButtonsRow/PlayPauseIconButton"]
[editable path="HBoxContainer/VBoxContainer/IconButtonsRow/NextTrackIconButton"]

View File

@@ -1,9 +1,8 @@
@tool
extends Control
extends Button
class_name IconButton
signal on_pressed
@export var data: String
@export var image: Texture:
@@ -18,6 +17,18 @@ func _ready():
$%Texture.texture = image
func _on_gui_input(event: InputEvent) -> void:
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
on_pressed.emit()
func _on_mouse_entered() -> void:
if TweenFX.is_playing(self, TweenFX.Animations.BREATHE):
return
TweenFX.breathe(self, 1)
func _on_mouse_exited() -> void:
TweenFX.stop(self, TweenFX.Animations.BREATHE)
scale = Vector2(1, 1)
func _on_pressed() -> void:
if TweenFX.is_playing(self, TweenFX.Animations.PRESS_ROTATE):
return
TweenFX.press_rotate(self)

View File

@@ -3,34 +3,61 @@
[ext_resource type="Script" uid="uid://bpbgecvan0a5k" path="res://core/main_scene_ui/icon_button.gd" id="1_r8gxt"]
[ext_resource type="Texture2D" uid="uid://dldg826x1kkoe" path="res://core/main_scene_ui/assets/weather_test.png" id="1_upldh"]
[node name="IconButton" type="Control" unique_id=1750448019]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_r8gxt"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_6q6an"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_60w2f"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_4xtsh"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_305hl"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_jurvi"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_xxros"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_3kui7"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ogiom"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_4beq1"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_cxhgx"]
[node name="IconButton" type="Button" unique_id=1621140689]
custom_minimum_size = Vector2(160, 160)
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
anchors_preset = -1
anchor_right = 0.083333336
anchor_bottom = 0.14814815
pivot_offset_ratio = Vector2(0.5, 0.5)
theme_override_styles/normal = SubResource("StyleBoxEmpty_r8gxt")
theme_override_styles/normal_mirrored = SubResource("StyleBoxEmpty_6q6an")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_60w2f")
theme_override_styles/pressed_mirrored = SubResource("StyleBoxEmpty_4xtsh")
theme_override_styles/hover = SubResource("StyleBoxEmpty_305hl")
theme_override_styles/hover_mirrored = SubResource("StyleBoxEmpty_jurvi")
theme_override_styles/hover_pressed = SubResource("StyleBoxEmpty_xxros")
theme_override_styles/hover_pressed_mirrored = SubResource("StyleBoxEmpty_3kui7")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_ogiom")
theme_override_styles/disabled_mirrored = SubResource("StyleBoxEmpty_4beq1")
theme_override_styles/focus = SubResource("StyleBoxEmpty_cxhgx")
script = ExtResource("1_r8gxt")
image = ExtResource("1_upldh")
metadata/_edit_use_anchors_ = true
[node name="Texture" type="TextureRect" parent="." unique_id=1071359322]
unique_name_in_owner = true
custom_minimum_size = Vector2(160, 160)
layout_mode = 1
anchors_preset = -1
anchor_left = 0.45833334
anchor_top = 0.42592594
anchor_right = 0.5416667
anchor_bottom = 0.5740741
offset_left = 80.0
offset_top = 79.99997
offset_right = -80.0
offset_bottom = -80.0
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("1_upldh")
expand_mode = 1
metadata/_edit_use_anchors_ = true
[connection signal="gui_input" from="." to="." method="_on_gui_input"]
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]
[connection signal="pressed" from="." to="." method="_on_pressed"]

View File

@@ -4,19 +4,23 @@ signal on_option_changed(data: String)
@onready var current_icon_button: IconButton
@onready var icon_buttons_options: Array[IconButton]
@onready var show_container_tween: ContainerTween = $%ShowContainerTween
@onready var hide_container_tween: ContainerTween = $%HideContainerTween
var is_menu_open: bool = false
func _ready() -> void:
for i in range(get_child_count()):
if get_child(i) is not Control:
continue
var icon_button: IconButton = get_child(i)
if i == 0:
current_icon_button = icon_button
icon_button.on_pressed.connect(on_current_icon_button_pressed)
icon_button.pressed.connect(on_current_icon_button_pressed)
else:
icon_buttons_options.append(icon_button)
icon_button.on_pressed.connect(_on_icon_pressed_changed.bind(icon_button))
icon_button.pressed.connect(_on_icon_pressed_changed.bind(icon_button))
func _on_icon_pressed_changed(in_icon_button: IconButton):
@@ -30,6 +34,9 @@ func _on_icon_pressed_changed(in_icon_button: IconButton):
func on_current_icon_button_pressed() -> void:
if show_container_tween.is_running or hide_container_tween.is_running:
return
if is_menu_open:
hide_options()
else:
@@ -37,12 +44,15 @@ func on_current_icon_button_pressed() -> void:
func show_options() -> void:
for icon_button in icon_buttons_options:
icon_button.show()
#for icon_button in icon_buttons_options:
#icon_button.show()
show_container_tween.start_tween()
is_menu_open = true
func hide_options() -> void:
for icon_button in icon_buttons_options:
icon_button.hide()
#for icon_button in icon_buttons_options:
#icon_button.hide()
hide_container_tween.start_tween()
await hide_container_tween.finished
is_menu_open = false

View File

@@ -2,6 +2,7 @@
[ext_resource type="PackedScene" uid="uid://2tqofxxxnvhv" path="res://core/main_scene_ui/icon_button.tscn" id="1_lnxme"]
[ext_resource type="Script" uid="uid://cpf5rwmd0kaa6" path="res://core/main_scene_ui/icon_buttons_row.gd" id="1_xq3mw"]
[ext_resource type="PackedScene" uid="uid://dxun0jk5t0n6" path="res://core/tween/container_tween.tscn" id="3_58qdb"]
[node name="IconButtonsRow" type="HBoxContainer" unique_id=1734127019]
custom_minimum_size = Vector2(800, 0)
@@ -41,3 +42,15 @@ visible = false
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 3
[node name="ShowContainerTween" parent="." unique_id=160227524 node_paths=PackedStringArray("targets") instance=ExtResource("3_58qdb")]
unique_name_in_owner = true
targets = [NodePath("../IconButton2"), NodePath("../IconButton3"), NodePath("../IconButton4"), NodePath("../IconButton5")]
tween_types = Array[String](["impact_land"])
show_on_start = true
[node name="HideContainerTween" parent="." unique_id=1169748375 node_paths=PackedStringArray("targets") instance=ExtResource("3_58qdb")]
unique_name_in_owner = true
targets = [NodePath("../IconButton5"), NodePath("../IconButton4"), NodePath("../IconButton3"), NodePath("../IconButton2")]
tween_types = Array[String](["impact_land"])
hide_on_finish = true

View File

@@ -1,49 +0,0 @@
extends Control
enum Weather {RAIN, SNOW}
@onready var game_menu: Control = $%GameMenu
func _on_menu_icon_button_on_pressed() -> void:
GameState.pause_game()
game_menu.show()
func _on_photo_icon_button_on_pressed() -> void:
GameState.on_enable_photo_mode_request.emit()
func _on_collectible_icon_button_on_pressed() -> void:
GameState.pause_game()
game_menu.on_tab_pressed(1, true)
game_menu.show()
func _on_time_of_day_row_on_option_changed(data: String) -> void:
match data:
"Sunrise":
UIEvents.time_option_item_changed.emit(0)
"Day":
UIEvents.time_option_item_changed.emit(1)
"Sunset":
UIEvents.time_option_item_changed.emit(2)
"Night":
UIEvents.time_option_item_changed.emit(3)
_:
pass
func _on_weather_row_on_option_changed(data: String) -> void:
match data:
"Snow":
UIEvents.toggle_snow.emit(true)
"Rain":
UIEvents.toggle_rain.emit(true)
"Storm":
UIEvents.toggle_storm.emit(true)
"Wind":
UIEvents.toggle_wind.emit(true)
"Random":
pass
_:
pass

View File

@@ -0,0 +1,67 @@
extends Control
enum Weather {RAIN, SNOW}
@onready var game_menu: Control = $%GameMenu
@onready var game_menu_panel: Control = $%GameMenuPanel
@onready var menu_icon_button: Button = $%MenuIconButton
@onready var photo_icon_button: Button = $%PhotoIconButton
@onready var collectible_icon_button: Button = $%CollectibleIconButton
@onready var resume_button: Button = $GameMenuPanel/GameMenu/Pages/Page3/OptionMenu/VBoxContainer/ResumeButton
@onready var show_container_tween: ContainerTween = $%ShowContainerTween
@onready var hide_container_tween: ContainerTween = $%HideContainerTween
func _ready() -> void:
menu_icon_button.pressed.connect(_on_menu_icon_button_pressed)
photo_icon_button.pressed.connect(_on_photo_icon_button_pressed)
collectible_icon_button.pressed.connect(_on_collectible_icon_button_pressed)
resume_button.pressed.connect(_on_resume_button_pressed)
func _on_menu_icon_button_pressed() -> void:
GameState.pause_game()
game_menu_panel.show()
show_container_tween.start_tween()
func _on_photo_icon_button_pressed() -> void:
GameState.on_enable_photo_mode_request.emit()
func _on_collectible_icon_button_pressed() -> void:
GameState.pause_game()
game_menu.on_tab_pressed(1, true)
game_menu_panel.show()
show_container_tween.start_tween()
func _on_resume_button_pressed() -> void:
hide_container_tween.start_tween()
await hide_container_tween.finished
game_menu_panel.hide()
GameState.resume_game()
func _on_time_of_day_row_on_option_changed(data: String) -> void:
match data:
"Sunrise":
UIEvents.time_option_item_changed.emit(0)
"Day":
UIEvents.time_option_item_changed.emit(1)
"Sunset":
UIEvents.time_option_item_changed.emit(2)
"Night":
UIEvents.time_option_item_changed.emit(3)
_:
pass
func _on_weather_row_on_option_changed(data: String) -> void:
match data:
"Snow":
UIEvents.toggle_snow.emit(true)
"Rain":
UIEvents.toggle_rain.emit(true)
"Storm":
UIEvents.toggle_storm.emit(true)
"Wind":
UIEvents.toggle_wind.emit(true)
"Random":
pass
_:
pass

View File

@@ -1,21 +1,23 @@
[gd_scene format=3 uid="uid://bei7fscn77p1p"]
[ext_resource type="PackedScene" uid="uid://ir8nke8o6ssm" path="res://core/main_scene_ui/icon_buttons_row.tscn" id="1_87dkt"]
[ext_resource type="Script" uid="uid://bhad1id8jr8jw" path="res://core/main_scene_ui/main_menu_ui.gd" id="1_aurcl"]
[ext_resource type="PackedScene" uid="uid://2tqofxxxnvhv" path="res://core/main_scene_ui/icon_button.tscn" id="1_fjauj"]
[ext_resource type="PackedScene" uid="uid://dqqm4o8j45tr6" path="res://core/game_menu/game_menu.tscn" id="4_7q818"]
[ext_resource type="PackedScene" uid="uid://cpeyt1dgrtglc" path="res://core/radio/radio.tscn" id="5_21kh1"]
[ext_resource type="PackedScene" uid="uid://dg4f3v0ukpmay" path="res://core/main_scene_ui/audio_player.tscn" id="6_1h1a0"]
[ext_resource type="AudioStream" uid="uid://70cc8she43re" path="res://docs/gyms/radio/lofi_01.ogg" id="6_vhlrw"]
[ext_resource type="Script" uid="uid://bhad1id8jr8jw" path="res://core/main_scene_ui/main_scene_ui.gd" id="1_h43jo"]
[ext_resource type="PackedScene" uid="uid://ir8nke8o6ssm" path="res://core/main_scene_ui/icon_buttons_row.tscn" id="2_4cc8f"]
[ext_resource type="PackedScene" uid="uid://2tqofxxxnvhv" path="res://core/main_scene_ui/icon_button.tscn" id="3_t1xop"]
[ext_resource type="PackedScene" uid="uid://dqqm4o8j45tr6" path="res://core/game_menu/game_menu.tscn" id="4_jh36j"]
[ext_resource type="PackedScene" uid="uid://cpeyt1dgrtglc" path="res://core/radio/radio.tscn" id="5_nevjt"]
[ext_resource type="AudioStream" uid="uid://70cc8she43re" path="res://docs/gyms/radio/lofi_01.ogg" id="6_kd244"]
[ext_resource type="PackedScene" uid="uid://dg4f3v0ukpmay" path="res://core/main_scene_ui/audio_player.tscn" id="7_lapqe"]
[ext_resource type="PackedScene" uid="uid://dxun0jk5t0n6" path="res://core/tween/container_tween.tscn" id="8_msh61"]
[node name="MainMenuUi" type="Control" unique_id=1359391222]
[node name="MainSceneUi" type="Control" unique_id=1359391222]
process_mode = 3
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_aurcl")
script = ExtResource("1_h43jo")
[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=2071886807]
custom_minimum_size = Vector2(160, 320)
@@ -27,7 +29,7 @@ offset_top = -320.0
offset_right = 160.0
grow_vertical = 0
[node name="TimeOfDayRow" parent="VBoxContainer" unique_id=1734127019 instance=ExtResource("1_87dkt")]
[node name="TimeOfDayRow" parent="VBoxContainer" unique_id=1734127019 instance=ExtResource("2_4cc8f")]
layout_mode = 2
[node name="IconButton2" parent="VBoxContainer/TimeOfDayRow" index="1" unique_id=638856991]
@@ -42,7 +44,13 @@ data = "Sunset"
[node name="IconButton5" parent="VBoxContainer/TimeOfDayRow" index="4" unique_id=315412403]
data = "Night"
[node name="WeatherRow" parent="VBoxContainer" unique_id=1803637359 instance=ExtResource("1_87dkt")]
[node name="ShowContainerTween" parent="VBoxContainer/TimeOfDayRow" index="5" unique_id=160227524]
tween_types = Array[String](["impact_land", "fade_in"])
[node name="HideContainerTween" parent="VBoxContainer/TimeOfDayRow" index="6" unique_id=1169748375]
tween_types = Array[String](["impact_land", "fade_out"])
[node name="WeatherRow" parent="VBoxContainer" unique_id=1803637359 instance=ExtResource("2_4cc8f")]
layout_mode = 2
[node name="IconButton2" parent="VBoxContainer/WeatherRow" index="1" unique_id=638856991]
@@ -57,7 +65,15 @@ data = "Storm"
[node name="IconButton5" parent="VBoxContainer/WeatherRow" index="4" unique_id=315412403]
data = "Wind"
[node name="IconButton6" parent="VBoxContainer/WeatherRow" unique_id=218253485 instance=ExtResource("1_fjauj")]
[node name="ShowContainerTween" parent="VBoxContainer/WeatherRow" index="5" unique_id=160227524 node_paths=PackedStringArray("targets")]
targets = [NodePath("../IconButton2"), NodePath("../IconButton3"), NodePath("../IconButton4"), NodePath("../IconButton5"), NodePath("../IconButton6")]
tween_types = Array[String](["impact_land", "fade_in"])
[node name="HideContainerTween" parent="VBoxContainer/WeatherRow" index="6" unique_id=1169748375 node_paths=PackedStringArray("targets")]
targets = [NodePath("../IconButton6"), NodePath("../IconButton5"), NodePath("../IconButton4"), NodePath("../IconButton3"), NodePath("../IconButton2")]
tween_types = Array[String](["impact_land", "fade_out"])
[node name="IconButton6" parent="VBoxContainer/WeatherRow" unique_id=218253485 instance=ExtResource("3_t1xop")]
unique_name_in_owner = true
visible = false
layout_mode = 2
@@ -65,15 +81,15 @@ size_flags_horizontal = 0
size_flags_vertical = 3
data = "Random"
[node name="MenuIconButton" parent="." unique_id=707872474 instance=ExtResource("1_fjauj")]
[node name="MenuIconButton" parent="." unique_id=707872474 instance=ExtResource("3_t1xop")]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
anchor_bottom = 0.0
offset_left = -160.0
offset_bottom = 160.0
grow_horizontal = 0
grow_vertical = 1
[node name="CollectionOptions" type="VBoxContainer" parent="." unique_id=542153805]
layout_mode = 1
@@ -88,21 +104,32 @@ offset_bottom = 20.0
grow_horizontal = 0
grow_vertical = 2
[node name="PhotoIconButton" parent="CollectionOptions" unique_id=1863476241 instance=ExtResource("1_fjauj")]
[node name="PhotoIconButton" parent="CollectionOptions" unique_id=1863476241 instance=ExtResource("3_t1xop")]
unique_name_in_owner = true
layout_mode = 2
[node name="CollectibleIconButton" parent="CollectionOptions" unique_id=520235552 instance=ExtResource("1_fjauj")]
[node name="CollectibleIconButton" parent="CollectionOptions" unique_id=520235552 instance=ExtResource("3_t1xop")]
unique_name_in_owner = true
layout_mode = 2
[node name="GameMenu" parent="." unique_id=2124096517 instance=ExtResource("4_7q818")]
[node name="GameMenuPanel" type="Panel" parent="." unique_id=846120687]
unique_name_in_owner = true
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Radio" parent="." unique_id=1234112225 instance=ExtResource("5_21kh1")]
playlist = Array[AudioStream]([ExtResource("6_vhlrw")])
[node name="GameMenu" parent="GameMenuPanel" unique_id=2124096517 instance=ExtResource("4_jh36j")]
unique_name_in_owner = true
layout_mode = 1
[node name="AudioPlayer" parent="." unique_id=425192018 node_paths=PackedStringArray("radio") instance=ExtResource("6_1h1a0")]
[node name="Radio" parent="." unique_id=1234112225 instance=ExtResource("5_nevjt")]
playlist = Array[AudioStream]([ExtResource("6_kd244")])
[node name="AudioPlayer" parent="." unique_id=425192018 node_paths=PackedStringArray("radio") instance=ExtResource("7_lapqe")]
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
@@ -117,11 +144,23 @@ grow_horizontal = 0
grow_vertical = 0
radio = NodePath("../Radio")
[node name="ShowContainerTween" parent="." unique_id=902285649 node_paths=PackedStringArray("targets") instance=ExtResource("8_msh61")]
unique_name_in_owner = true
targets = [NodePath("../GameMenuPanel/GameMenu")]
tween_types = Array[String](["fold_in"])
show_on_start = true
[node name="HideContainerTween" parent="." unique_id=1041880010 node_paths=PackedStringArray("targets") instance=ExtResource("8_msh61")]
unique_name_in_owner = true
targets = [NodePath("../GameMenuPanel/GameMenu")]
tween_types = Array[String](["fold_out"])
hide_on_finish = true
[connection signal="on_option_changed" from="VBoxContainer/TimeOfDayRow" to="." method="_on_time_of_day_row_on_option_changed"]
[connection signal="on_option_changed" from="VBoxContainer/WeatherRow" to="." method="_on_weather_row_on_option_changed"]
[connection signal="on_pressed" from="MenuIconButton" to="." method="_on_menu_icon_button_on_pressed"]
[connection signal="on_pressed" from="CollectionOptions/PhotoIconButton" to="." method="_on_photo_icon_button_on_pressed"]
[connection signal="on_pressed" from="CollectionOptions/CollectibleIconButton" to="." method="_on_collectible_icon_button_on_pressed"]
[editable path="VBoxContainer/TimeOfDayRow"]
[editable path="VBoxContainer/WeatherRow"]
[editable path="GameMenuPanel/GameMenu"]
[editable path="GameMenuPanel/GameMenu/Pages/Page3"]
[editable path="GameMenuPanel/GameMenu/Pages/Page3/OptionMenu"]

View File

@@ -4,6 +4,7 @@
[ext_resource type="Resource" uid="uid://dr612tmciq8pg" path="res://core/scene_manager/scene_config.tres" id="2_vtdwt"]
[node name="SceneManager" type="CanvasLayer" unique_id=399843239]
process_mode = 3
layer = 100
script = ExtResource("1_7resu")
config = ExtResource("2_vtdwt")

View File

@@ -0,0 +1,86 @@
extends Node
class_name ContainerTween
signal finished
enum AnimateOrder {
AS_IS,
TOP_TO_BOTTOM,
BOTTOM_TO_TOP,
LEFT_TO_RIGHT,
RIGHT_TO_LEFT
}
@export_group("Settings")
@export var targets: Array[Control]
@export var runtime_target_parent: Control
@export var tween_types: Array[String] = ["punch_in"]
@export var order: AnimateOrder = AnimateOrder.AS_IS
@export var stagger_delay: float = 0.05
@export var show_on_start: bool = false
@export var hide_on_finish: bool = false
@export var reset_state_on_start: bool = true
var _tween_generation: int = 0
var is_running: bool = false
func start_tween() -> void:
if is_running:
return
is_running = true
_tween_generation += 1
var current_gen = _tween_generation
var sorted_targets = targets.duplicate() if !targets.is_empty() else runtime_target_parent.get_children().duplicate()
match order:
AnimateOrder.TOP_TO_BOTTOM:
sorted_targets.sort_custom(func(a, b): return a.global_position.y < b.global_position.y)
AnimateOrder.BOTTOM_TO_TOP:
sorted_targets.sort_custom(func(a, b): return a.global_position.y > b.global_position.y)
AnimateOrder.LEFT_TO_RIGHT:
sorted_targets.sort_custom(func(a, b): return a.global_position.x < b.global_position.x)
AnimateOrder.RIGHT_TO_LEFT:
sorted_targets.sort_custom(func(a, b): return a.global_position.x > b.global_position.x)
var last_tween: Tween = null
for target in sorted_targets:
if current_gen != _tween_generation:
return
if is_instance_valid(target):
if reset_state_on_start:
target.scale = Vector2.ONE
target.modulate.a = 1.0
if show_on_start:
target.show()
for type in tween_types:
var tween = TweenFX.call(type, target)
if tween is Tween:
last_tween = tween
if hide_on_finish and tween is Tween:
tween.tween_callback(target.hide)
if stagger_delay > 0.0:
await get_tree().create_timer(stagger_delay).timeout
if is_instance_valid(last_tween) and last_tween.is_running():
await last_tween.finished
if current_gen == _tween_generation:
is_running = false
finished.emit()
func stop_tween() -> void:
is_running = false
_tween_generation += 1
var current_targets = targets if !targets.is_empty() else runtime_target_parent.get_children()
for target in current_targets:
if is_instance_valid(target):
TweenFX.stop_all(target)

View File

@@ -0,0 +1,7 @@
[gd_scene format=3 uid="uid://dxun0jk5t0n6"]
[ext_resource type="Script" uid="uid://ryxh3nm7ayvf" path="res://core/tween/container_tween.gd" id="1_qfild"]
[node name="ContainerTween" type="Node" unique_id=160227524]
process_mode = 3
script = ExtResource("1_qfild")

View File

@@ -24,6 +24,7 @@ CollectionManager="*uid://22orqdm34hfm"
AudioManager="*uid://dcttbbavtwtsg"
SceneManager="*uid://bw8hwkw55j675"
ShaderWarmup="res://core/shader_warmup.gd"
TweenFX="*uid://d2n10rw2dnx8o"
[display]
@@ -34,7 +35,7 @@ window/stretch/aspect="expand"
[editor_plugins]
enabled=PackedStringArray()
enabled=PackedStringArray("res://addons/TweenFX/plugin.cfg")
[global_group]

View File

@@ -6,33 +6,33 @@
[ext_resource type="Script" uid="uid://brcimd12tx3dm" path="res://core/daynight/edge_detection_compositor.gd" id="4_lpdy6"]
[ext_resource type="PackedScene" uid="uid://ujv2f1l4d2ps" path="res://core/biome_generator/biome_generator.tscn" id="5_islkt"]
[ext_resource type="Script" uid="uid://wv6kcqkibium" path="res://core/biome_generator/biome.gd" id="6_jfe74"]
[ext_resource type="PackedScene" uid="uid://b8blm6bwintf7" path="res://tgcc/chunk/countryside/scene/chunk_country_empty_01.tscn" id="7_5lqbd"]
[ext_resource type="PackedScene" uid="uid://cjv1e8pc6gde1" path="res://tgcc/chunk/countryside/scene/chunk_country_corner_01.tscn" id="8_aiwf5"]
[ext_resource type="PackedScene" uid="uid://dqoai3665vb0a" path="res://tgcc/chunk/countryside/scene/chunk_country_corner_02.tscn" id="9_0gakq"]
[ext_resource type="PackedScene" uid="uid://crlk31ecl480n" path="res://tgcc/chunk/countryside/scene/chunk_country_corner_03.tscn" id="10_8taq1"]
[ext_resource type="PackedScene" uid="uid://brpp7fe5noq8v" path="res://tgcc/chunk/countryside/scene/chunk_country_cross_3_01.tscn" id="11_bx28o"]
[ext_resource type="PackedScene" uid="uid://qmt8bkiksgj3" path="res://tgcc/chunk/countryside/scene/chunk_country_cross_3_02.tscn" id="12_e3o1y"]
[ext_resource type="PackedScene" uid="uid://d1tfkhuktwthn" path="res://tgcc/chunk/countryside/scene/chunk_country_cross_3_03.tscn" id="13_pesa5"]
[ext_resource type="PackedScene" uid="uid://b002wu5ltuqi4" path="res://tgcc/chunk/countryside/scene/chunk_country_end_01.tscn" id="14_d5byn"]
[ext_resource type="PackedScene" uid="uid://dtfmvcbninrcu" path="res://tgcc/chunk/countryside/scene/chunk_country_end_02.tscn" id="15_vk128"]
[ext_resource type="PackedScene" uid="uid://h6xj43vo84uf" path="res://tgcc/chunk/countryside/scene/chunk_country_straight_01.tscn" id="16_0l4fn"]
[ext_resource type="PackedScene" uid="uid://cu2chsjh8wuvp" path="res://tgcc/chunk/countryside/scene/chunk_country_straight_02.tscn" id="17_0l3s0"]
[ext_resource type="PackedScene" uid="uid://pxmcy0lhne5d" path="res://tgcc/chunk/countryside/scene/chunk_country_straight_03.tscn" id="18_0mfe6"]
[ext_resource type="PackedScene" uid="uid://bs3dkwcc8w2uk" path="res://tgcc/chunk/river/scene/chunk_river_curve_1.tscn" id="19_8ws46"]
[ext_resource type="PackedScene" uid="uid://btipd6wev016d" path="res://tgcc/chunk/river/scene/chunk_river_straight_1.tscn" id="20_fv7f0"]
[ext_resource type="PackedScene" uid="uid://deaxxlxdipqvx" path="res://tgcc/chunk/river/scene/chunk_river_end_1.tscn" id="21_psqnm"]
[ext_resource type="PackedScene" uid="uid://ct3084nflycla" path="res://tgcc/chunk/river/scene/chunk_river_mix1_1.tscn" id="22_j4kwo"]
[ext_resource type="PackedScene" uid="uid://bhvmmw8d8vns5" path="res://tgcc/chunk/river/scene/chunk_river_mix2_1.tscn" id="23_53r6v"]
[ext_resource type="PackedScene" uid="uid://cqe4t842io22i" path="res://tgcc/chunk/river/scene/chunk_river_cross_1.tscn" id="24_esnpb"]
[ext_resource type="PackedScene" uid="uid://rjvefmcd4bpo" path="res://tgcc/chunk/river/scene/chunk_river_mix3_1.tscn" id="25_6ik1i"]
[ext_resource type="PackedScene" uid="uid://c6vpwol3k384y" path="res://tgcc/chunk/river/scene/chunk_river_mix4_1.tscn" id="26_x7bpo"]
[ext_resource type="PackedScene" uid="uid://cd3iyj71hkgcr" path="res://tgcc/chunk/river/scene/chunk_river_mix5_1.tscn" id="27_e6m8d"]
[ext_resource type="PackedScene" uid="uid://bh8kbw07bsu6n" path="res://tgcc/chunk/river/scene/chunk_river_mix6_1.tscn" id="28_jdvk1"]
[ext_resource type="PackedScene" uid="uid://ce6qvpb27fdpo" path="res://tgcc/chunk/river/scene/chunk_river_curve_2.tscn" id="29_otsi4"]
[ext_resource type="PackedScene" uid="uid://7063xk3bwboc" path="res://tgcc/chunk/river/scene/chunk_river_straight_4.tscn" id="30_pvks6"]
[ext_resource type="PackedScene" uid="uid://ccgd3uy68r88h" path="res://tgcc/chunk/river/scene/chunk_river_curve_3.tscn" id="31_36ld5"]
[ext_resource type="PackedScene" uid="uid://mpgyaho52lii" path="res://tgcc/chunk/river/scene/chunk_river_straight_5.tscn" id="32_4i5nu"]
[ext_resource type="PackedScene" uid="uid://q26mkh3cupic" path="res://tgcc/chunk/river/scene/chunk_river_cross_2.tscn" id="33_3gjue"]
[ext_resource type="PackedScene" uid="uid://b8blm6bwintf7" path="res://tgcc/chunk/countryside/scene/rice/chunk_country_empty_01.tscn" id="7_5lqbd"]
[ext_resource type="PackedScene" uid="uid://cjv1e8pc6gde1" path="res://tgcc/chunk/countryside/scene/rice/chunk_country_corner_01.tscn" id="8_aiwf5"]
[ext_resource type="PackedScene" uid="uid://dqoai3665vb0a" path="res://tgcc/chunk/countryside/scene/rice/chunk_country_corner_02.tscn" id="9_0gakq"]
[ext_resource type="PackedScene" uid="uid://crlk31ecl480n" path="res://tgcc/chunk/countryside/scene/rice/chunk_country_corner_03.tscn" id="10_8taq1"]
[ext_resource type="PackedScene" uid="uid://brpp7fe5noq8v" path="res://tgcc/chunk/countryside/scene/rice/chunk_country_cross_3_01.tscn" id="11_bx28o"]
[ext_resource type="PackedScene" uid="uid://qmt8bkiksgj3" path="res://tgcc/chunk/countryside/scene/rice/chunk_country_cross_3_02.tscn" id="12_e3o1y"]
[ext_resource type="PackedScene" uid="uid://d1tfkhuktwthn" path="res://tgcc/chunk/countryside/scene/rice/chunk_country_cross_3_03.tscn" id="13_pesa5"]
[ext_resource type="PackedScene" uid="uid://b002wu5ltuqi4" path="res://tgcc/chunk/countryside/scene/rice/chunk_country_end_01.tscn" id="14_d5byn"]
[ext_resource type="PackedScene" uid="uid://dtfmvcbninrcu" path="res://tgcc/chunk/countryside/scene/rice/chunk_country_end_02.tscn" id="15_vk128"]
[ext_resource type="PackedScene" uid="uid://h6xj43vo84uf" path="res://tgcc/chunk/countryside/scene/rice/chunk_country_straight_01.tscn" id="16_0l4fn"]
[ext_resource type="PackedScene" uid="uid://cu2chsjh8wuvp" path="res://tgcc/chunk/countryside/scene/rice/chunk_country_straight_02.tscn" id="17_0l3s0"]
[ext_resource type="PackedScene" uid="uid://pxmcy0lhne5d" path="res://tgcc/chunk/countryside/scene/rice/chunk_country_straight_03.tscn" id="18_0mfe6"]
[ext_resource type="PackedScene" uid="uid://bs3dkwcc8w2uk" path="res://tgcc/chunk/countryside/scene/rice/river/scene/chunk_river_curve_1.tscn" id="19_8ws46"]
[ext_resource type="PackedScene" uid="uid://btipd6wev016d" path="res://tgcc/chunk/countryside/scene/rice/river/scene/chunk_river_straight_1.tscn" id="20_fv7f0"]
[ext_resource type="PackedScene" uid="uid://deaxxlxdipqvx" path="res://tgcc/chunk/countryside/scene/rice/river/scene/chunk_river_end_1.tscn" id="21_psqnm"]
[ext_resource type="PackedScene" uid="uid://ct3084nflycla" path="res://tgcc/chunk/countryside/scene/rice/river/scene/chunk_river_mix1_1.tscn" id="22_j4kwo"]
[ext_resource type="PackedScene" uid="uid://bhvmmw8d8vns5" path="res://tgcc/chunk/countryside/scene/rice/river/scene/chunk_river_mix2_1.tscn" id="23_53r6v"]
[ext_resource type="PackedScene" uid="uid://cqe4t842io22i" path="res://tgcc/chunk/countryside/scene/rice/river/scene/chunk_river_cross_1.tscn" id="24_esnpb"]
[ext_resource type="PackedScene" uid="uid://rjvefmcd4bpo" path="res://tgcc/chunk/countryside/scene/rice/river/scene/chunk_river_mix3_1.tscn" id="25_6ik1i"]
[ext_resource type="PackedScene" uid="uid://c6vpwol3k384y" path="res://tgcc/chunk/countryside/scene/rice/river/scene/chunk_river_mix4_1.tscn" id="26_x7bpo"]
[ext_resource type="PackedScene" uid="uid://cd3iyj71hkgcr" path="res://tgcc/chunk/countryside/scene/rice/river/scene/chunk_river_mix5_1.tscn" id="27_e6m8d"]
[ext_resource type="PackedScene" uid="uid://bh8kbw07bsu6n" path="res://tgcc/chunk/countryside/scene/rice/river/scene/chunk_river_mix6_1.tscn" id="28_jdvk1"]
[ext_resource type="PackedScene" uid="uid://ce6qvpb27fdpo" path="res://tgcc/chunk/countryside/scene/rice/river/scene/chunk_river_curve_2.tscn" id="29_otsi4"]
[ext_resource type="PackedScene" uid="uid://7063xk3bwboc" path="res://tgcc/chunk/countryside/scene/rice/river/scene/chunk_river_straight_4.tscn" id="30_pvks6"]
[ext_resource type="PackedScene" uid="uid://ccgd3uy68r88h" path="res://tgcc/chunk/countryside/scene/rice/river/scene/chunk_river_curve_3.tscn" id="31_36ld5"]
[ext_resource type="PackedScene" uid="uid://mpgyaho52lii" path="res://tgcc/chunk/countryside/scene/rice/river/scene/chunk_river_straight_5.tscn" id="32_4i5nu"]
[ext_resource type="PackedScene" uid="uid://q26mkh3cupic" path="res://tgcc/chunk/countryside/scene/rice/river/scene/chunk_river_cross_2.tscn" id="33_3gjue"]
[ext_resource type="Resource" uid="uid://cmd6s6thq4f7r" path="res://core/biome_generator/entities_pool.tres" id="34_a2cst"]
[ext_resource type="PackedScene" uid="uid://cv5xmnow451kl" path="res://core/camera.tscn" id="35_f2l8p"]
[ext_resource type="PackedScene" uid="uid://cmuvmmp7xam4o" path="res://core/daynight/environment_management.tscn" id="36_qwsp8"]
@@ -44,12 +44,12 @@
[ext_resource type="AudioStream" uid="uid://elrjw0smm0cj" path="res://core/daynight/sounds/rain_3.mp3" id="42_mh642"]
[ext_resource type="PackedScene" uid="uid://1c1ion0qnho4" path="res://tgcc/map/map_1/map_1.tscn" id="43_ysd85"]
[ext_resource type="Script" uid="uid://dboerd4a6dwj7" path="res://core/biome_generator/rails.gd" id="44_rcqo0"]
[ext_resource type="PackedScene" uid="uid://dvk3bytqn3m5s" path="res://tgcc/train/main_train.tscn" id="45_c0jxs"]
[ext_resource type="PackedScene" uid="uid://dvk3bytqn3m5s" path="res://tgcc/train/test/Train_test.tscn" id="45_c0jxs"]
[ext_resource type="Resource" uid="uid://bjnytgwt8tmf4" path="res://core/biome_generator/wagon_pool.tres" id="46_exdk1"]
[ext_resource type="PackedScene" uid="uid://0kgjaqijaqku" path="res://docs/museums/biome_generator/rails.tscn" id="46_lbmv2"]
[ext_resource type="PackedScene" uid="uid://dn1btv0e0ses7" path="res://core/fireworks.tscn" id="47_q7p65"]
[ext_resource type="Script" uid="uid://cx2tlvxhvatj5" path="res://docs/museums/daynight/control.gd" id="48_r5xyi"]
[ext_resource type="PackedScene" uid="uid://bei7fscn77p1p" path="res://core/main_scene_ui/main_menu_ui.tscn" id="49_exdk1"]
[ext_resource type="PackedScene" uid="uid://bei7fscn77p1p" path="res://core/main_scene_ui/main_scene_ui.tscn" id="49_exdk1"]
[ext_resource type="PackedScene" uid="uid://vni5kjalum6d" path="res://core/photo_mode/runtime/photo_mode_controller.tscn" id="50_57hhv"]
[sub_resource type="FastNoiseLite" id="FastNoiseLite_wjpfq"]
@@ -454,7 +454,7 @@ theme_override_colors/font_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/font_outline_color = Color(1, 1, 1, 1)
text = "Update Rails"
[node name="MainMenuUi" parent="." unique_id=1359391222 instance=ExtResource("49_exdk1")]
[node name="MainSceneUi" parent="." unique_id=1359391222 instance=ExtResource("49_exdk1")]
mouse_filter = 2
[connection signal="toggled" from="Control/Snow" to="Control" method="_on_snow_toggled"]

Binary file not shown.