refactoring UI
This commit was merged in pull request #26.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
@tool
|
||||
extends Control
|
||||
extends Button
|
||||
|
||||
class_name IconButton
|
||||
|
||||
signal on_pressed
|
||||
|
||||
@export var data: String
|
||||
@export var image: Texture:
|
||||
@@ -12,12 +11,22 @@ signal on_pressed
|
||||
if is_inside_tree() and has_node("%Texture"):
|
||||
$%Texture.texture = image
|
||||
|
||||
@onready var mini_texture: TextureRect = $%MiniTexture
|
||||
|
||||
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_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)
|
||||
|
||||
@@ -3,34 +3,78 @@
|
||||
[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"]
|
||||
[node name="MiniTexture" type="TextureRect" parent="." unique_id=65158044]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -32.0
|
||||
offset_top = -32.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
texture = ExtResource("1_upldh")
|
||||
expand_mode = 1
|
||||
|
||||
[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"]
|
||||
|
||||
@@ -2,47 +2,50 @@ extends HBoxContainer
|
||||
|
||||
signal on_option_changed(data: String)
|
||||
|
||||
@onready var current_icon_button: IconButton
|
||||
@onready var icon_buttons_options: Array[IconButton]
|
||||
@onready var category_icon_button: IconButton
|
||||
@onready var options_icon_buttons: 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)
|
||||
category_icon_button = icon_button
|
||||
icon_button.pressed.connect(on_category_icon_button_pressed)
|
||||
icon_button.mini_texture.visible = true
|
||||
else:
|
||||
icon_buttons_options.append(icon_button)
|
||||
icon_button.on_pressed.connect(_on_icon_pressed_changed.bind(icon_button))
|
||||
|
||||
options_icon_buttons.append(icon_button)
|
||||
icon_button.pressed.connect(on_icon_pressed_changed.bind(icon_button))
|
||||
icon_button.mini_texture.visible = false
|
||||
|
||||
func _on_icon_pressed_changed(in_icon_button: IconButton):
|
||||
for icon_button in icon_buttons_options:
|
||||
func on_icon_pressed_changed(in_icon_button: IconButton):
|
||||
for icon_button in options_icon_buttons:
|
||||
if icon_button == in_icon_button:
|
||||
current_icon_button.image = in_icon_button.image
|
||||
current_icon_button.data = in_icon_button.data
|
||||
category_icon_button.mini_texture.texture = in_icon_button.image
|
||||
category_icon_button.data = in_icon_button.data
|
||||
on_option_changed.emit(icon_button.data)
|
||||
break
|
||||
hide_options()
|
||||
|
||||
|
||||
func on_current_icon_button_pressed() -> void:
|
||||
func on_category_icon_button_pressed() -> void:
|
||||
if show_container_tween.is_running or hide_container_tween.is_running:
|
||||
return
|
||||
|
||||
if is_menu_open:
|
||||
hide_options()
|
||||
else:
|
||||
show_options()
|
||||
|
||||
|
||||
func show_options() -> void:
|
||||
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()
|
||||
hide_container_tween.start_tween()
|
||||
await hide_container_tween.finished
|
||||
is_menu_open = false
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
78
core/main_scene_ui/main_scene_ui.gd
Normal file
78
core/main_scene_ui/main_scene_ui.gd
Normal file
@@ -0,0 +1,78 @@
|
||||
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
|
||||
@onready var weather_row: HBoxContainer = $%WeatherRow
|
||||
|
||||
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":
|
||||
pick_random_weather()
|
||||
_:
|
||||
pass
|
||||
|
||||
func pick_random_weather() -> void:
|
||||
var valid_buttons = []
|
||||
for child in weather_row.options_icon_buttons:
|
||||
if child.data.to_lower() != "random":
|
||||
valid_buttons.append(child)
|
||||
|
||||
if valid_buttons.size() > 0:
|
||||
var random_button = valid_buttons.pick_random()
|
||||
weather_row.on_icon_pressed_changed(random_button)
|
||||
@@ -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,14 @@ 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")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
|
||||
[node name="IconButton2" parent="VBoxContainer/WeatherRow" index="1" unique_id=638856991]
|
||||
@@ -57,7 +66,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 +82,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 +105,15 @@ offset_bottom = 20.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="PhotoIconButton" parent="CollectionOptions" unique_id=1863476241 instance=ExtResource("1_fjauj")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="CollectibleIconButton" parent="CollectionOptions" unique_id=520235552 instance=ExtResource("1_fjauj")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="GameMenu" parent="." unique_id=2124096517 instance=ExtResource("4_7q818")]
|
||||
[node name="PhotoIconButton" parent="CollectionOptions" unique_id=1863476241 instance=ExtResource("3_t1xop")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Radio" parent="." unique_id=1234112225 instance=ExtResource("5_21kh1")]
|
||||
playlist = Array[AudioStream]([ExtResource("6_vhlrw")])
|
||||
[node name="CollectibleIconButton" parent="CollectionOptions" unique_id=520235552 instance=ExtResource("3_t1xop")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
|
||||
[node name="AudioPlayer" parent="." unique_id=425192018 node_paths=PackedStringArray("radio") instance=ExtResource("6_1h1a0")]
|
||||
[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 +128,40 @@ grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
radio = NodePath("../Radio")
|
||||
|
||||
[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="GameMenu" parent="GameMenuPanel" unique_id=2124096517 instance=ExtResource("4_jh36j")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
|
||||
[node name="Radio" parent="." unique_id=1234112225 instance=ExtResource("5_nevjt")]
|
||||
playlist = Array[AudioStream]([ExtResource("6_kd244")])
|
||||
|
||||
[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"]
|
||||
Reference in New Issue
Block a user