diff --git a/core/ai/agents/base/ai_base.gd b/core/ai/agents/base/ai_base.gd index 05718bb..8a203b3 100644 --- a/core/ai/agents/base/ai_base.gd +++ b/core/ai/agents/base/ai_base.gd @@ -58,6 +58,13 @@ func _physics_process(delta: float) -> void: func navigate_to_random_point() -> void: var nav_map_rid = get_world_3d().get_navigation_map() var patrol_radius = patrol_radius_shape.shape.radius - var target_point_in_space = global_position + Vector3(randf_range(-1, 1), 0, randf_range(-1, 1)).normalized() * randf_range(0, patrol_radius) - var closest_valid_point = NavigationServer3D.map_get_closest_point(nav_map_rid, target_point_in_space) - nav_agent.target_position = closest_valid_point + + for i in range(10): + var target_point_in_space = global_position + Vector3(randf_range(-1, 1), 0, randf_range(-1, 1)).normalized() * randf_range(0, patrol_radius) + var closest_valid_point = NavigationServer3D.map_get_closest_point(nav_map_rid, target_point_in_space) + nav_agent.target_position = closest_valid_point + + if nav_agent.is_target_reachable(): + return + + nav_agent.target_position = global_position diff --git a/core/game_menu/arrow_button.gd b/core/game_menu/arrow_button.gd index 96a47d9..4756311 100644 --- a/core/game_menu/arrow_button.gd +++ b/core/game_menu/arrow_button.gd @@ -23,17 +23,23 @@ func _ready(): func _on_pressed() -> void: - if TweenFX.is_playing(self, TweenFX.Animations.PUNCH_IN): - return + TweenFX.stop_all(self) + scale = Vector2.ONE + rotation = 0.0 + modulate.a = 1.0 TweenFX.punch_in(self) func _on_mouse_entered() -> void: - if TweenFX.is_playing(self, TweenFX.Animations.BREATHE): - return + TweenFX.stop_all(self) + scale = Vector2.ONE + rotation = 0.0 + modulate.a = 1.0 TweenFX.breathe(self, 1) func _on_mouse_exited() -> void: - TweenFX.stop(self, TweenFX.Animations.BREATHE) - scale = Vector2(1, 1) + TweenFX.stop_all(self) + scale = Vector2.ONE + rotation = 0.0 + modulate.a = 1.0 diff --git a/core/game_menu/biome_picker.gd b/core/game_menu/biome_picker.gd index e97d724..cb06f73 100644 --- a/core/game_menu/biome_picker.gd +++ b/core/game_menu/biome_picker.gd @@ -19,6 +19,8 @@ func _ready(): TweenFX.breathe(self, 1) func _on_pressed() -> void: - if TweenFX.is_playing(self, TweenFX.Animations.PRESS_ROTATE): - return + TweenFX.stop_all(self) + scale = Vector2.ONE + rotation = 0.0 + modulate.a = 1.0 TweenFX.press_rotate(self) diff --git a/core/game_menu/color_picker.gd b/core/game_menu/color_picker.gd index 7de5759..1a767ac 100644 --- a/core/game_menu/color_picker.gd +++ b/core/game_menu/color_picker.gd @@ -29,6 +29,10 @@ func select() -> void: return selected = true $%Border.color.a = 1 + TweenFX.stop_all(self) + scale = Vector2.ONE + rotation = 0.0 + modulate.a = 1.0 TweenFX.press_rotate(self) @@ -40,12 +44,15 @@ func deselect() -> void: func _on_mouse_entered() -> void: - if TweenFX.is_playing(self, TweenFX.Animations.BREATHE): - return + TweenFX.stop_all(self) + scale = Vector2.ONE + rotation = 0.0 + modulate.a = 1.0 TweenFX.breathe(self, 1) func _on_mouse_exited() -> void: - TweenFX.stop(self, TweenFX.Animations.BREATHE) - scale = Vector2(1, 1) - + TweenFX.stop_all(self) + scale = Vector2.ONE + rotation = 0.0 + modulate.a = 1.0 diff --git a/core/game_menu/game_menu.gd b/core/game_menu/game_menu.gd index 34b9df0..fe85df5 100644 --- a/core/game_menu/game_menu.gd +++ b/core/game_menu/game_menu.gd @@ -2,7 +2,7 @@ extends Control @onready var tabs: Array[GameMenuTab] = [$%Tab1, $%Tab2, $%Tab3] @onready var pages: Array[GameMenuPage] = [$%Page1, $%Page2, $%Page3] - +var current_index = 0 func _ready() -> void: for tab: GameMenuTab in tabs: @@ -27,3 +27,7 @@ func on_tab_pressed(index: int, disable_animation: bool = false) -> void: tab.deselect() pages[index].show_page() + current_index = index + +func open() -> void: + pages[current_index].show_page() diff --git a/core/game_menu/highlighted_photo.gd b/core/game_menu/highlighted_photo.gd index 11d1258..f820ba2 100644 --- a/core/game_menu/highlighted_photo.gd +++ b/core/game_menu/highlighted_photo.gd @@ -16,8 +16,14 @@ func _on_photo_highlighted(texture: Texture) -> void: photo.setup(texture) +var is_closing: bool = false + func _on_panel_gui_input(event: InputEvent) -> void: + if is_closing: + return if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed: + is_closing = true await TweenFX.fold_out(photo).finished photo.texture_rect.texture = null hide() + is_closing = false diff --git a/core/game_menu/option_menu_button.gd b/core/game_menu/option_menu_button.gd index 064df73..b7b2e74 100644 --- a/core/game_menu/option_menu_button.gd +++ b/core/game_menu/option_menu_button.gd @@ -13,17 +13,23 @@ func _ready(): func _on_pressed() -> void: - if TweenFX.is_playing(self, TweenFX.Animations.PUNCH_IN): - return + TweenFX.stop_all(self) + scale = Vector2.ONE + rotation = 0.0 + modulate.a = 1.0 TweenFX.punch_in(self) func _on_mouse_entered() -> void: - if TweenFX.is_playing(self, TweenFX.Animations.BREATHE): - return + TweenFX.stop_all(self) + scale = Vector2.ONE + rotation = 0.0 + modulate.a = 1.0 TweenFX.breathe(self, 1) func _on_mouse_exited() -> void: - TweenFX.stop(self, TweenFX.Animations.BREATHE) - scale = Vector2(1, 1) + TweenFX.stop_all(self) + scale = Vector2.ONE + rotation = 0.0 + modulate.a = 1.0 diff --git a/core/game_menu/page.gd b/core/game_menu/page.gd index a6b83a5..16e017d 100644 --- a/core/game_menu/page.gd +++ b/core/game_menu/page.gd @@ -2,6 +2,8 @@ extends Control class_name GameMenuPage +func _ready() -> void: + GameState.on_game_resumed.connect(_on_game_resumed) func show_page() -> void: var tweens = find_children("*", "ContainerTween", true, false) @@ -11,4 +13,12 @@ func show_page() -> void: func hide_page() -> void: + var tweens = find_children("*", "ContainerTween", true, false) + for tween in tweens: + tween.stop_tween() hide() + +func _on_game_resumed() -> void: + var tweens = find_children("*", "ContainerTween", true, false) + for tween in tweens: + tween.stop_tween() diff --git a/core/game_menu/photo.gd b/core/game_menu/photo.gd index ac83eba..f86804a 100644 --- a/core/game_menu/photo.gd +++ b/core/game_menu/photo.gd @@ -12,19 +12,25 @@ func setup(texture: Texture) -> void: func _on_pressed() -> void: - if TweenFX.is_playing(self, TweenFX.Animations.PUNCH_IN): - return + TweenFX.stop_all(self) + scale = Vector2.ONE + rotation = 0.0 + modulate.a = 1.0 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.stop_all(self) + scale = Vector2.ONE + rotation = 0.0 + modulate.a = 1.0 TweenFX.breathe(self, 1) func _on_mouse_exited() -> void: - TweenFX.stop(self, TweenFX.Animations.BREATHE) - scale = Vector2(1, 1) + TweenFX.stop_all(self) + scale = Vector2.ONE + rotation = 0.0 + modulate.a = 1.0 diff --git a/core/game_state/game_state.gd b/core/game_state/game_state.gd index 8478080..984734c 100644 --- a/core/game_state/game_state.gd +++ b/core/game_state/game_state.gd @@ -10,6 +10,16 @@ signal on_photo_highlighted(teture: Texture) signal on_enable_photo_mode_request @warning_ignore("unused_signal") signal on_disable_photo_mode_request +@warning_ignore("unused_signal") +signal on_photo_taken_prepare +@warning_ignore("unused_signal") +signal on_photo_taken_started +@warning_ignore("unused_signal") +signal on_photo_taken_making +@warning_ignore("unused_signal") +signal on_photo_taken_finished +@warning_ignore("unused_signal") +signal on_photo_mode_black_screen_disappeared const SAVE_PATH: String = "user://savegame.json" diff --git a/core/main_menu/main_menu.gd b/core/main_menu/main_menu.gd index b6e5a97..7e341ab 100644 --- a/core/main_menu/main_menu.gd +++ b/core/main_menu/main_menu.gd @@ -2,15 +2,19 @@ extends Control @onready var settings_menu: Control = $%SettingsMenu @onready var option_menu: Control = $%OptionMenu -@onready var show_container_tween: ContainerTween = $%ShowContainerTween -@onready var hide_container_tween: ContainerTween = $%HideContainerTween func _ready() -> void: option_menu.settings_button.pressed.connect(_on_settings_button_pressed) func _on_settings_button_pressed() -> void: + if TweenFX.is_playing(settings_menu, TweenFX.Animations.FOLD_IN) or TweenFX.is_playing(settings_menu, TweenFX.Animations.FOLD_OUT): + return if settings_menu.visible: - hide_container_tween.start_tween() + TweenFX.fold_out(settings_menu) + await TweenFX.fold_out(settings_menu).finished + settings_menu.hide() else: - show_container_tween.start_tween() + settings_menu.scale = Vector2(1,1) + settings_menu.show() + TweenFX.fold_in(settings_menu) diff --git a/core/main_menu/main_menu.tscn b/core/main_menu/main_menu.tscn index 3749c13..db712ac 100644 --- a/core/main_menu/main_menu.tscn +++ b/core/main_menu/main_menu.tscn @@ -4,7 +4,6 @@ [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 @@ -61,16 +60,4 @@ offset_right = 552.0 offset_bottom = 256.0 grow_vertical = 2 -[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"] diff --git a/core/main_scene_ui/assets/button_audio_next.png b/core/main_scene_ui/assets/button_audio_next.png new file mode 100644 index 0000000..aab1d6c Binary files /dev/null and b/core/main_scene_ui/assets/button_audio_next.png differ diff --git a/core/main_scene_ui/assets/button_audio_next.png.import b/core/main_scene_ui/assets/button_audio_next.png.import new file mode 100644 index 0000000..fb2f31e --- /dev/null +++ b/core/main_scene_ui/assets/button_audio_next.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d2ft1kea45hec" +path="res://.godot/imported/button_audio_next.png-17e91d5e4df00a576a14bcd4d3696d32.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_audio_next.png" +dest_files=["res://.godot/imported/button_audio_next.png-17e91d5e4df00a576a14bcd4d3696d32.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 diff --git a/core/main_scene_ui/assets/button_audio_off.png b/core/main_scene_ui/assets/button_audio_off.png new file mode 100644 index 0000000..a33d34a Binary files /dev/null and b/core/main_scene_ui/assets/button_audio_off.png differ diff --git a/core/main_scene_ui/assets/button_audio_off.png.import b/core/main_scene_ui/assets/button_audio_off.png.import new file mode 100644 index 0000000..08cc1ca --- /dev/null +++ b/core/main_scene_ui/assets/button_audio_off.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dbxhxvvg4s8ru" +path="res://.godot/imported/button_audio_off.png-617d21714200dc3a38b43c8cba95a132.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_audio_off.png" +dest_files=["res://.godot/imported/button_audio_off.png-617d21714200dc3a38b43c8cba95a132.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 diff --git a/core/main_scene_ui/assets/button_audio_on.png b/core/main_scene_ui/assets/button_audio_on.png new file mode 100644 index 0000000..1d74455 Binary files /dev/null and b/core/main_scene_ui/assets/button_audio_on.png differ diff --git a/core/main_scene_ui/assets/button_audio_on.png.import b/core/main_scene_ui/assets/button_audio_on.png.import new file mode 100644 index 0000000..913d2c4 --- /dev/null +++ b/core/main_scene_ui/assets/button_audio_on.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b0mir57askv7j" +path="res://.godot/imported/button_audio_on.png-dd086d7a5c226f69ac7b3cfbadd7154e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_audio_on.png" +dest_files=["res://.godot/imported/button_audio_on.png-dd086d7a5c226f69ac7b3cfbadd7154e.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 diff --git a/core/main_scene_ui/assets/button_audio_pause.png b/core/main_scene_ui/assets/button_audio_pause.png new file mode 100644 index 0000000..9e188d6 Binary files /dev/null and b/core/main_scene_ui/assets/button_audio_pause.png differ diff --git a/core/main_scene_ui/assets/button_audio_pause.png.import b/core/main_scene_ui/assets/button_audio_pause.png.import new file mode 100644 index 0000000..57fc510 --- /dev/null +++ b/core/main_scene_ui/assets/button_audio_pause.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://vx7wa6afj4ri" +path="res://.godot/imported/button_audio_pause.png-2a8a35733bc746b9a958a2941115243f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_audio_pause.png" +dest_files=["res://.godot/imported/button_audio_pause.png-2a8a35733bc746b9a958a2941115243f.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 diff --git a/core/main_scene_ui/assets/button_audio_play.png b/core/main_scene_ui/assets/button_audio_play.png new file mode 100644 index 0000000..1ed0a4b Binary files /dev/null and b/core/main_scene_ui/assets/button_audio_play.png differ diff --git a/core/main_scene_ui/assets/button_audio_play.png.import b/core/main_scene_ui/assets/button_audio_play.png.import new file mode 100644 index 0000000..deece2b --- /dev/null +++ b/core/main_scene_ui/assets/button_audio_play.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bdnevc7ewu5qe" +path="res://.godot/imported/button_audio_play.png-4965b6c3221c73f6a58fb05bdcbe0268.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_audio_play.png" +dest_files=["res://.godot/imported/button_audio_play.png-4965b6c3221c73f6a58fb05bdcbe0268.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 diff --git a/core/main_scene_ui/assets/button_audio_previous.png b/core/main_scene_ui/assets/button_audio_previous.png new file mode 100644 index 0000000..b9e8cac Binary files /dev/null and b/core/main_scene_ui/assets/button_audio_previous.png differ diff --git a/core/main_scene_ui/assets/button_audio_previous.png.import b/core/main_scene_ui/assets/button_audio_previous.png.import new file mode 100644 index 0000000..e19b47b --- /dev/null +++ b/core/main_scene_ui/assets/button_audio_previous.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cqx45c744325t" +path="res://.godot/imported/button_audio_previous.png-375059d79d180148465016932aa2ac12.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_audio_previous.png" +dest_files=["res://.godot/imported/button_audio_previous.png-375059d79d180148465016932aa2ac12.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 diff --git a/core/main_scene_ui/assets/button_chrono_day.png b/core/main_scene_ui/assets/button_chrono_day.png new file mode 100644 index 0000000..925dacf Binary files /dev/null and b/core/main_scene_ui/assets/button_chrono_day.png differ diff --git a/core/main_scene_ui/assets/button_chrono_day.png.import b/core/main_scene_ui/assets/button_chrono_day.png.import new file mode 100644 index 0000000..f2272cb --- /dev/null +++ b/core/main_scene_ui/assets/button_chrono_day.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://24p0rdm86cn" +path="res://.godot/imported/button_chrono_day.png-3ddab67e694789d130ce50061a39b5d1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_chrono_day.png" +dest_files=["res://.godot/imported/button_chrono_day.png-3ddab67e694789d130ce50061a39b5d1.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 diff --git a/core/main_scene_ui/assets/button_chrono_night.png b/core/main_scene_ui/assets/button_chrono_night.png new file mode 100644 index 0000000..3c38803 Binary files /dev/null and b/core/main_scene_ui/assets/button_chrono_night.png differ diff --git a/core/main_scene_ui/assets/button_chrono_night.png.import b/core/main_scene_ui/assets/button_chrono_night.png.import new file mode 100644 index 0000000..af8cda3 --- /dev/null +++ b/core/main_scene_ui/assets/button_chrono_night.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bkos5j6dwqcxw" +path="res://.godot/imported/button_chrono_night.png-279ca6caeb4f12cca476e354c7bf9592.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_chrono_night.png" +dest_files=["res://.godot/imported/button_chrono_night.png-279ca6caeb4f12cca476e354c7bf9592.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 diff --git a/core/main_scene_ui/assets/button_chrono_sunset.png b/core/main_scene_ui/assets/button_chrono_sunset.png new file mode 100644 index 0000000..a48cff2 Binary files /dev/null and b/core/main_scene_ui/assets/button_chrono_sunset.png differ diff --git a/core/main_scene_ui/assets/button_chrono_sunset.png.import b/core/main_scene_ui/assets/button_chrono_sunset.png.import new file mode 100644 index 0000000..df5b5c7 --- /dev/null +++ b/core/main_scene_ui/assets/button_chrono_sunset.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ccylkmwm2nb6q" +path="res://.godot/imported/button_chrono_sunset.png-ad73e6ff3e1c7574edbfaaefec144dc3.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_chrono_sunset.png" +dest_files=["res://.godot/imported/button_chrono_sunset.png-ad73e6ff3e1c7574edbfaaefec144dc3.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 diff --git a/core/main_scene_ui/assets/button_collection.png b/core/main_scene_ui/assets/button_collection.png new file mode 100644 index 0000000..2faa069 Binary files /dev/null and b/core/main_scene_ui/assets/button_collection.png differ diff --git a/core/main_scene_ui/assets/button_collection.png.import b/core/main_scene_ui/assets/button_collection.png.import new file mode 100644 index 0000000..d085406 --- /dev/null +++ b/core/main_scene_ui/assets/button_collection.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dttoiuq4lgq5j" +path="res://.godot/imported/button_collection.png-ae0e910fcc941043f54433a1f0e4609f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_collection.png" +dest_files=["res://.godot/imported/button_collection.png-ae0e910fcc941043f54433a1f0e4609f.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 diff --git a/core/main_scene_ui/assets/button_collection02.png b/core/main_scene_ui/assets/button_collection02.png new file mode 100644 index 0000000..9f0e285 Binary files /dev/null and b/core/main_scene_ui/assets/button_collection02.png differ diff --git a/core/main_scene_ui/assets/button_collection02.png.import b/core/main_scene_ui/assets/button_collection02.png.import new file mode 100644 index 0000000..a294489 --- /dev/null +++ b/core/main_scene_ui/assets/button_collection02.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ji0nb7x1s1it" +path="res://.godot/imported/button_collection02.png-67f98ad7a50d033fba466aaebfe77c8a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_collection02.png" +dest_files=["res://.godot/imported/button_collection02.png-67f98ad7a50d033fba466aaebfe77c8a.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 diff --git a/core/main_scene_ui/assets/button_collection03.png b/core/main_scene_ui/assets/button_collection03.png new file mode 100644 index 0000000..694077e Binary files /dev/null and b/core/main_scene_ui/assets/button_collection03.png differ diff --git a/core/main_scene_ui/assets/button_collection03.png.import b/core/main_scene_ui/assets/button_collection03.png.import new file mode 100644 index 0000000..09cdac7 --- /dev/null +++ b/core/main_scene_ui/assets/button_collection03.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b03si5ir3ypp7" +path="res://.godot/imported/button_collection03.png-381f22d69b1c3c89a36a638f90c7e1b8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_collection03.png" +dest_files=["res://.godot/imported/button_collection03.png-381f22d69b1c3c89a36a638f90c7e1b8.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 diff --git a/core/main_scene_ui/assets/button_daynightcycle.png b/core/main_scene_ui/assets/button_daynightcycle.png new file mode 100644 index 0000000..15dce89 Binary files /dev/null and b/core/main_scene_ui/assets/button_daynightcycle.png differ diff --git a/core/main_scene_ui/assets/button_daynightcycle.png.import b/core/main_scene_ui/assets/button_daynightcycle.png.import new file mode 100644 index 0000000..217d041 --- /dev/null +++ b/core/main_scene_ui/assets/button_daynightcycle.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://y12wqk2bkoi1" +path="res://.godot/imported/button_daynightcycle.png-69e795b664a9071e6c4105b5e25c7abb.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_daynightcycle.png" +dest_files=["res://.godot/imported/button_daynightcycle.png-69e795b664a9071e6c4105b5e25c7abb.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 diff --git a/core/main_scene_ui/assets/button_photomode.png b/core/main_scene_ui/assets/button_photomode.png new file mode 100644 index 0000000..2cd3c60 Binary files /dev/null and b/core/main_scene_ui/assets/button_photomode.png differ diff --git a/core/main_scene_ui/assets/button_photomode.png.import b/core/main_scene_ui/assets/button_photomode.png.import new file mode 100644 index 0000000..bcecf1e --- /dev/null +++ b/core/main_scene_ui/assets/button_photomode.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://1n3paucfsovj" +path="res://.godot/imported/button_photomode.png-e79e3abf7716dd24a1f28b0a376d6d0c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_photomode.png" +dest_files=["res://.godot/imported/button_photomode.png-e79e3abf7716dd24a1f28b0a376d6d0c.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 diff --git a/core/main_scene_ui/assets/button_random.png b/core/main_scene_ui/assets/button_random.png new file mode 100644 index 0000000..31c874b Binary files /dev/null and b/core/main_scene_ui/assets/button_random.png differ diff --git a/core/main_scene_ui/assets/button_random.png.import b/core/main_scene_ui/assets/button_random.png.import new file mode 100644 index 0000000..be1f117 --- /dev/null +++ b/core/main_scene_ui/assets/button_random.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://tex06svipyg4" +path="res://.godot/imported/button_random.png-9547902e723e6a3090929d4a2dc77f8b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_random.png" +dest_files=["res://.godot/imported/button_random.png-9547902e723e6a3090929d4a2dc77f8b.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 diff --git a/core/main_scene_ui/assets/button_settings.png b/core/main_scene_ui/assets/button_settings.png new file mode 100644 index 0000000..ee80ae4 Binary files /dev/null and b/core/main_scene_ui/assets/button_settings.png differ diff --git a/core/main_scene_ui/assets/button_settings.png.import b/core/main_scene_ui/assets/button_settings.png.import new file mode 100644 index 0000000..96c2621 --- /dev/null +++ b/core/main_scene_ui/assets/button_settings.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b7h2kc3o86rv2" +path="res://.godot/imported/button_settings.png-4b0bceeed668262e532274c5605aa203.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_settings.png" +dest_files=["res://.godot/imported/button_settings.png-4b0bceeed668262e532274c5605aa203.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 diff --git a/core/main_scene_ui/assets/button_weather01.png b/core/main_scene_ui/assets/button_weather01.png new file mode 100644 index 0000000..e963916 Binary files /dev/null and b/core/main_scene_ui/assets/button_weather01.png differ diff --git a/core/main_scene_ui/assets/button_weather01.png.import b/core/main_scene_ui/assets/button_weather01.png.import new file mode 100644 index 0000000..573fd00 --- /dev/null +++ b/core/main_scene_ui/assets/button_weather01.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cc6e2piksgv1a" +path="res://.godot/imported/button_weather01.png-45c952f33be70e18ae06c81b25bb5311.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_weather01.png" +dest_files=["res://.godot/imported/button_weather01.png-45c952f33be70e18ae06c81b25bb5311.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 diff --git a/core/main_scene_ui/assets/button_weather02.png b/core/main_scene_ui/assets/button_weather02.png new file mode 100644 index 0000000..e3011c4 Binary files /dev/null and b/core/main_scene_ui/assets/button_weather02.png differ diff --git a/core/main_scene_ui/assets/button_weather02.png.import b/core/main_scene_ui/assets/button_weather02.png.import new file mode 100644 index 0000000..a5e6ef2 --- /dev/null +++ b/core/main_scene_ui/assets/button_weather02.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ddqmcpt506ruu" +path="res://.godot/imported/button_weather02.png-438e6a2cb8ecac072d8406dba53e4725.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_weather02.png" +dest_files=["res://.godot/imported/button_weather02.png-438e6a2cb8ecac072d8406dba53e4725.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 diff --git a/core/main_scene_ui/assets/button_weather03.png b/core/main_scene_ui/assets/button_weather03.png new file mode 100644 index 0000000..a8f559a Binary files /dev/null and b/core/main_scene_ui/assets/button_weather03.png differ diff --git a/core/main_scene_ui/assets/button_weather03.png.import b/core/main_scene_ui/assets/button_weather03.png.import new file mode 100644 index 0000000..c646174 --- /dev/null +++ b/core/main_scene_ui/assets/button_weather03.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bk457dlo13pvq" +path="res://.godot/imported/button_weather03.png-7a61a3418c243ea64b4dbe1fe4365ad5.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_weather03.png" +dest_files=["res://.godot/imported/button_weather03.png-7a61a3418c243ea64b4dbe1fe4365ad5.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 diff --git a/core/main_scene_ui/assets/button_weather_norain.png b/core/main_scene_ui/assets/button_weather_norain.png new file mode 100644 index 0000000..2587328 Binary files /dev/null and b/core/main_scene_ui/assets/button_weather_norain.png differ diff --git a/core/main_scene_ui/assets/button_weather_norain.png.import b/core/main_scene_ui/assets/button_weather_norain.png.import new file mode 100644 index 0000000..a33e55f --- /dev/null +++ b/core/main_scene_ui/assets/button_weather_norain.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b4t4nvejvi0su" +path="res://.godot/imported/button_weather_norain.png-aafd2f4eb9233cb124ffde569b090995.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_weather_norain.png" +dest_files=["res://.godot/imported/button_weather_norain.png-aafd2f4eb9233cb124ffde569b090995.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 diff --git a/core/main_scene_ui/assets/button_weather_nosnow.png b/core/main_scene_ui/assets/button_weather_nosnow.png new file mode 100644 index 0000000..5296a2e Binary files /dev/null and b/core/main_scene_ui/assets/button_weather_nosnow.png differ diff --git a/core/main_scene_ui/assets/button_weather_nosnow.png.import b/core/main_scene_ui/assets/button_weather_nosnow.png.import new file mode 100644 index 0000000..c9b887f --- /dev/null +++ b/core/main_scene_ui/assets/button_weather_nosnow.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://blttomjog2rin" +path="res://.godot/imported/button_weather_nosnow.png-f785f119d06ab4f6ebc8ea0a703ab5a8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_weather_nosnow.png" +dest_files=["res://.godot/imported/button_weather_nosnow.png-f785f119d06ab4f6ebc8ea0a703ab5a8.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 diff --git a/core/main_scene_ui/assets/button_weather_nostorm.png b/core/main_scene_ui/assets/button_weather_nostorm.png new file mode 100644 index 0000000..8ed9f67 Binary files /dev/null and b/core/main_scene_ui/assets/button_weather_nostorm.png differ diff --git a/core/main_scene_ui/assets/button_weather_nostorm.png.import b/core/main_scene_ui/assets/button_weather_nostorm.png.import new file mode 100644 index 0000000..08178d4 --- /dev/null +++ b/core/main_scene_ui/assets/button_weather_nostorm.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://wxla636wypht" +path="res://.godot/imported/button_weather_nostorm.png-59c73c738aca40c077a482fcd8f1cc82.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_weather_nostorm.png" +dest_files=["res://.godot/imported/button_weather_nostorm.png-59c73c738aca40c077a482fcd8f1cc82.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 diff --git a/core/main_scene_ui/assets/button_weather_nowind.png b/core/main_scene_ui/assets/button_weather_nowind.png new file mode 100644 index 0000000..3642bf4 Binary files /dev/null and b/core/main_scene_ui/assets/button_weather_nowind.png differ diff --git a/core/main_scene_ui/assets/button_weather_nowind.png.import b/core/main_scene_ui/assets/button_weather_nowind.png.import new file mode 100644 index 0000000..0f79e6b --- /dev/null +++ b/core/main_scene_ui/assets/button_weather_nowind.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cq65xyg4wsctm" +path="res://.godot/imported/button_weather_nowind.png-eec1a3778177627578aa9a848b91510f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_weather_nowind.png" +dest_files=["res://.godot/imported/button_weather_nowind.png-eec1a3778177627578aa9a848b91510f.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 diff --git a/core/main_scene_ui/assets/button_weather_rain.png b/core/main_scene_ui/assets/button_weather_rain.png new file mode 100644 index 0000000..5265ff7 Binary files /dev/null and b/core/main_scene_ui/assets/button_weather_rain.png differ diff --git a/core/main_scene_ui/assets/button_weather_rain.png.import b/core/main_scene_ui/assets/button_weather_rain.png.import new file mode 100644 index 0000000..4f991b5 --- /dev/null +++ b/core/main_scene_ui/assets/button_weather_rain.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d3v43kog5fwnf" +path="res://.godot/imported/button_weather_rain.png-c28920c6aeaadbecbc2899642985b531.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_weather_rain.png" +dest_files=["res://.godot/imported/button_weather_rain.png-c28920c6aeaadbecbc2899642985b531.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 diff --git a/core/main_scene_ui/assets/button_weather_snow.png b/core/main_scene_ui/assets/button_weather_snow.png new file mode 100644 index 0000000..e7d4342 Binary files /dev/null and b/core/main_scene_ui/assets/button_weather_snow.png differ diff --git a/core/main_scene_ui/assets/button_weather_snow.png.import b/core/main_scene_ui/assets/button_weather_snow.png.import new file mode 100644 index 0000000..3ce2113 --- /dev/null +++ b/core/main_scene_ui/assets/button_weather_snow.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bj0idkr7kd4ik" +path="res://.godot/imported/button_weather_snow.png-bfe291ef9c63ee26967e0823c2fd2e00.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_weather_snow.png" +dest_files=["res://.godot/imported/button_weather_snow.png-bfe291ef9c63ee26967e0823c2fd2e00.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 diff --git a/core/main_scene_ui/assets/button_weather_storm.png b/core/main_scene_ui/assets/button_weather_storm.png new file mode 100644 index 0000000..86705f8 Binary files /dev/null and b/core/main_scene_ui/assets/button_weather_storm.png differ diff --git a/core/main_scene_ui/assets/button_weather_storm.png.import b/core/main_scene_ui/assets/button_weather_storm.png.import new file mode 100644 index 0000000..47f4eb5 --- /dev/null +++ b/core/main_scene_ui/assets/button_weather_storm.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c7tkn1gj7iuqp" +path="res://.godot/imported/button_weather_storm.png-c0c12dd635b15f28517e2e9a84ff9013.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_weather_storm.png" +dest_files=["res://.godot/imported/button_weather_storm.png-c0c12dd635b15f28517e2e9a84ff9013.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 diff --git a/core/main_scene_ui/assets/button_weather_wind.png b/core/main_scene_ui/assets/button_weather_wind.png new file mode 100644 index 0000000..99f40cd Binary files /dev/null and b/core/main_scene_ui/assets/button_weather_wind.png differ diff --git a/core/main_scene_ui/assets/button_weather_wind.png.import b/core/main_scene_ui/assets/button_weather_wind.png.import new file mode 100644 index 0000000..4e06db0 --- /dev/null +++ b/core/main_scene_ui/assets/button_weather_wind.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://k75acvihjf1h" +path="res://.godot/imported/button_weather_wind.png-c5acdd549bb67bda7f41f85149b9ea88.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://core/main_scene_ui/assets/button_weather_wind.png" +dest_files=["res://.godot/imported/button_weather_wind.png-c5acdd549bb67bda7f41f85149b9ea88.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 diff --git a/core/main_scene_ui/assets/weather_test.png b/core/main_scene_ui/assets/weather_test.png deleted file mode 100644 index 089c57b..0000000 Binary files a/core/main_scene_ui/assets/weather_test.png and /dev/null differ diff --git a/core/main_scene_ui/audio_player.gd b/core/main_scene_ui/audio_player.gd index 551a021..f619838 100644 --- a/core/main_scene_ui/audio_player.gd +++ b/core/main_scene_ui/audio_player.gd @@ -19,22 +19,26 @@ func _ready() -> void: radio.track_changed.connect(_on_radio_track_changed) if radio.stream and radio.stream.resource_path: track_label.text = radio.stream.resource_path.get_file().get_basename().capitalize() + play_pause_icon_button.image = play_pause_icon_button.images[1] else: track_label.text = "Unknown Track" func _on_radio_track_changed(track_name: String) -> void: track_label.text = track_name + play_pause_icon_button.image = play_pause_icon_button.images[1] func _on_prev_track_icon_button_pressed() -> void: if radio: radio.prev_track() 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" + if radio: + if radio.stream: + radio.toggle_pause() + else: + radio.next_track() + var play_pause_index = 0 if radio.stream_paused else 1 + play_pause_icon_button.image = play_pause_icon_button.images[play_pause_index] func _on_next_track_icon_button_pressed() -> void: if radio: diff --git a/core/main_scene_ui/audio_player.tscn b/core/main_scene_ui/audio_player.tscn index 7a2680a..c28682b 100644 --- a/core/main_scene_ui/audio_player.tscn +++ b/core/main_scene_ui/audio_player.tscn @@ -2,6 +2,12 @@ [ext_resource type="Script" uid="uid://c4kekqicrv4m8" path="res://core/main_scene_ui/audio_player.gd" id="1_i2mrl"] [ext_resource type="PackedScene" uid="uid://2tqofxxxnvhv" path="res://core/main_scene_ui/icon_button.tscn" id="1_ucnyb"] +[ext_resource type="Texture2D" uid="uid://cqx45c744325t" path="res://core/main_scene_ui/assets/button_audio_previous.png" id="3_netjv"] +[ext_resource type="Texture2D" uid="uid://bdnevc7ewu5qe" path="res://core/main_scene_ui/assets/button_audio_play.png" id="4_urwwp"] +[ext_resource type="Texture2D" uid="uid://d2ft1kea45hec" path="res://core/main_scene_ui/assets/button_audio_next.png" id="5_0koyu"] +[ext_resource type="Texture2D" uid="uid://vx7wa6afj4ri" path="res://core/main_scene_ui/assets/button_audio_pause.png" id="5_urwwp"] +[ext_resource type="Texture2D" uid="uid://b0mir57askv7j" path="res://core/main_scene_ui/assets/button_audio_on.png" id="6_xv7rp"] +[ext_resource type="Texture2D" uid="uid://dbxhxvvg4s8ru" path="res://core/main_scene_ui/assets/button_audio_off.png" id="7_7ib2x"] [node name="AudioPlayer" type="Control" unique_id=425192018] layout_mode = 3 @@ -28,7 +34,7 @@ unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 4 theme_override_font_sizes/font_size = 24 -text = "Test Test" +text = "Uknown Track" horizontal_alignment = 1 vertical_alignment = 1 @@ -40,49 +46,52 @@ alignment = 1 unique_name_in_owner = true custom_minimum_size = Vector2(80, 80) layout_mode = 2 +image = ExtResource("3_netjv") +images = Array[Texture]([]) [node name="Texture" parent="HBoxContainer/VBoxContainer/IconButtonsRow/PrevTrackIconButton" index="0" unique_id=1071359322] custom_minimum_size = Vector2(80, 80) -anchor_left = 0.0 -anchor_top = 0.11538447 -anchor_right = 1.0 -anchor_bottom = 0.88461524 +anchors_preset = -1 offset_left = 116.66667 -offset_top = 122.14813 +offset_top = 131.3789 offset_right = -116.666664 -offset_bottom = -122.14813 +offset_bottom = -131.3789 +texture = ExtResource("3_netjv") +metadata/_edit_use_anchors_ = true [node name="PlayPauseIconButton" parent="HBoxContainer/VBoxContainer/IconButtonsRow" unique_id=1533336956 instance=ExtResource("1_ucnyb")] unique_name_in_owner = true custom_minimum_size = Vector2(80, 80) layout_mode = 2 +image = ExtResource("4_urwwp") +images = Array[Texture]([ExtResource("4_urwwp"), ExtResource("5_urwwp")]) [node name="Texture" parent="HBoxContainer/VBoxContainer/IconButtonsRow/PlayPauseIconButton" index="0" unique_id=1071359322] custom_minimum_size = Vector2(80, 80) -anchor_left = 0.0 -anchor_top = 0.11538447 -anchor_right = 1.0 -anchor_bottom = 0.88461524 +anchors_preset = -1 offset_left = 116.66667 -offset_top = 122.14813 +offset_top = 131.3789 offset_right = -116.666664 -offset_bottom = -122.14813 +offset_bottom = -131.3789 +texture = ExtResource("4_urwwp") +metadata/_edit_use_anchors_ = true [node name="NextTrackIconButton" parent="HBoxContainer/VBoxContainer/IconButtonsRow" unique_id=2108379455 instance=ExtResource("1_ucnyb")] unique_name_in_owner = true custom_minimum_size = Vector2(80, 80) layout_mode = 2 +image = ExtResource("5_0koyu") +images = Array[Texture]([]) [node name="Texture" parent="HBoxContainer/VBoxContainer/IconButtonsRow/NextTrackIconButton" index="0" unique_id=1071359322] custom_minimum_size = Vector2(80, 80) -anchor_left = 0.0 -anchor_top = 0.11538447 -anchor_right = 1.0 -anchor_bottom = 0.88461524 +anchors_preset = -1 offset_left = 116.66667 -offset_top = 122.14813 +offset_top = 131.3789 offset_right = -116.666664 -offset_bottom = -122.14813 +offset_bottom = -131.3789 +texture = ExtResource("5_0koyu") +metadata/_edit_use_anchors_ = true [node name="VBoxContainer2" type="VBoxContainer" parent="HBoxContainer" unique_id=1843266535] layout_mode = 2 @@ -94,17 +103,17 @@ custom_minimum_size = Vector2(40, 40) layout_mode = 2 size_flags_horizontal = 0 size_flags_vertical = 3 +image = ExtResource("6_xv7rp") +images = Array[Texture]([]) [node name="Texture" parent="HBoxContainer/VBoxContainer2/IncreaseVolumeIconButton" index="0" unique_id=1071359322] custom_minimum_size = Vector2(40, 40) -anchor_left = 0.25 -anchor_top = 0.35915482 -anchor_right = 0.75 -anchor_bottom = 0.64084494 -offset_left = 96.66667 -offset_top = 92.64813 -offset_right = -96.666664 -offset_bottom = -92.64813 +offset_left = 106.66667 +offset_top = 107.01433 +offset_right = -106.666664 +offset_bottom = -107.014336 +texture = ExtResource("6_xv7rp") +metadata/_edit_use_anchors_ = true [node name="DecreaseVolumeIconButton" parent="HBoxContainer/VBoxContainer2" unique_id=399629327 instance=ExtResource("1_ucnyb")] unique_name_in_owner = true @@ -112,17 +121,17 @@ custom_minimum_size = Vector2(40, 40) layout_mode = 2 size_flags_horizontal = 0 size_flags_vertical = 3 +image = ExtResource("7_7ib2x") +images = Array[Texture]([]) [node name="Texture" parent="HBoxContainer/VBoxContainer2/DecreaseVolumeIconButton" index="0" unique_id=1071359322] custom_minimum_size = Vector2(40, 40) -anchor_left = 0.25 -anchor_top = 0.35915482 -anchor_right = 0.75 -anchor_bottom = 0.64084494 -offset_left = 96.66667 -offset_top = 92.64813 -offset_right = -96.666664 -offset_bottom = -92.64813 +offset_left = 106.66667 +offset_top = 107.01433 +offset_right = -106.666664 +offset_bottom = -107.014336 +texture = ExtResource("7_7ib2x") +metadata/_edit_use_anchors_ = true [editable path="HBoxContainer/VBoxContainer/IconButtonsRow/PrevTrackIconButton"] [editable path="HBoxContainer/VBoxContainer/IconButtonsRow/PlayPauseIconButton"] diff --git a/core/main_scene_ui/center_hole.gdshader b/core/main_scene_ui/center_hole.gdshader new file mode 100644 index 0000000..d7dae3a --- /dev/null +++ b/core/main_scene_ui/center_hole.gdshader @@ -0,0 +1,19 @@ +shader_type canvas_item; + +// Dimensione del rettangolo vuoto al centro (in proporzione allo schermo) +// Esempio: vec2(0.6, 0.6) significa che il buco occuperà il 60% dello schermo. +// Puoi modificare questi valori direttamente dall'Inspector di Godot! +uniform vec2 hole_size = vec2(0.6, 0.6); + +void fragment() { + // Calcoliamo la distanza dal centro esatto dello schermo (0.5, 0.5) + vec2 center = vec2(0.5, 0.5); + vec2 d = abs(UV - center); + vec2 half_size = hole_size / 2.0; + + // Se il pixel si trova all'interno delle dimensioni del buco, + // impostiamo l'Alpha a 0.0 (rendendolo totalmente trasparente). + if (d.x < half_size.x && d.y < half_size.y) { + COLOR.a = 0.0; + } +} diff --git a/core/main_scene_ui/center_hole.gdshader.uid b/core/main_scene_ui/center_hole.gdshader.uid new file mode 100644 index 0000000..d9ae04e --- /dev/null +++ b/core/main_scene_ui/center_hole.gdshader.uid @@ -0,0 +1 @@ +uid://dudbt51v33tt7 diff --git a/core/main_scene_ui/hole_mask.gdshader b/core/main_scene_ui/hole_mask.gdshader new file mode 100644 index 0000000..8c30cbf --- /dev/null +++ b/core/main_scene_ui/hole_mask.gdshader @@ -0,0 +1,10 @@ +shader_type canvas_item; + +uniform sampler2D mask_texture; + +void fragment() { + vec4 mask_color = texture(mask_texture, UV); + // Sottrae l'alpha della maschera dall'alpha del pannello. + // Dove la maschera è opaca (alpha = 1), il pannello diventerà trasparente (alpha = 0). + COLOR.a = max(COLOR.a - mask_color.a, 0.0); +} diff --git a/core/main_scene_ui/hole_mask.gdshader.uid b/core/main_scene_ui/hole_mask.gdshader.uid new file mode 100644 index 0000000..ab71663 --- /dev/null +++ b/core/main_scene_ui/hole_mask.gdshader.uid @@ -0,0 +1 @@ +uid://44y4fig1hi4y diff --git a/core/main_scene_ui/icon_button.gd b/core/main_scene_ui/icon_button.gd index f5b6130..a9d6056 100644 --- a/core/main_scene_ui/icon_button.gd +++ b/core/main_scene_ui/icon_button.gd @@ -3,30 +3,36 @@ extends Button class_name IconButton - @export var data: String @export var image: Texture: set(value): image = value if is_inside_tree() and has_node("%Texture"): $%Texture.texture = image +@export var images: Array[Texture] +@export var apply_texture_on_selection: bool = true -@onready var mini_texture: TextureRect = $%MiniTexture func _ready(): if image != null and has_node("%Texture"): $%Texture.texture = image func _on_mouse_entered() -> void: - if TweenFX.is_playing(self, TweenFX.Animations.BREATHE): - return + TweenFX.stop_all(self) + scale = Vector2.ONE + rotation = 0.0 + modulate.a = 1.0 TweenFX.breathe(self, 1) func _on_mouse_exited() -> void: - TweenFX.stop(self, TweenFX.Animations.BREATHE) - scale = Vector2(1, 1) + TweenFX.stop_all(self) + scale = Vector2.ONE + rotation = 0.0 + modulate.a = 1.0 func _on_pressed() -> void: - if TweenFX.is_playing(self, TweenFX.Animations.PRESS_ROTATE): - return + TweenFX.stop_all(self) + scale = Vector2.ONE + rotation = 0.0 + modulate.a = 1.0 TweenFX.press_rotate(self) diff --git a/core/main_scene_ui/icon_button.tscn b/core/main_scene_ui/icon_button.tscn index 1fa6610..3549b0c 100644 --- a/core/main_scene_ui/icon_button.tscn +++ b/core/main_scene_ui/icon_button.tscn @@ -1,7 +1,7 @@ [gd_scene format=3 uid="uid://2tqofxxxnvhv"] [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"] +[ext_resource type="Texture2D" uid="uid://bkos5j6dwqcxw" path="res://core/main_scene_ui/assets/button_chrono_night.png" id="3_6q6an"] [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_r8gxt"] @@ -26,10 +26,10 @@ [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_cxhgx"] [node name="IconButton" type="Button" unique_id=1621140689] -custom_minimum_size = Vector2(160, 160) +custom_minimum_size = Vector2(80, 80) anchors_preset = -1 -anchor_right = 0.083333336 -anchor_bottom = 0.14814815 +anchor_right = 0.041666668 +anchor_bottom = 0.074074075 pivot_offset_ratio = Vector2(0.5, 0.5) theme_override_styles/normal = SubResource("StyleBoxEmpty_r8gxt") theme_override_styles/normal_mirrored = SubResource("StyleBoxEmpty_6q6an") @@ -43,36 +43,19 @@ 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") +image = ExtResource("3_6q6an") 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) +custom_minimum_size = Vector2(80, 80) layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -texture = ExtResource("1_upldh") -expand_mode = 1 - -[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") +texture = ExtResource("3_6q6an") expand_mode = 1 [connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"] diff --git a/core/main_scene_ui/icon_buttons_row.gd b/core/main_scene_ui/icon_buttons_row.gd index 73865cd..69cffa5 100644 --- a/core/main_scene_ui/icon_buttons_row.gd +++ b/core/main_scene_ui/icon_buttons_row.gd @@ -18,18 +18,19 @@ func _ready() -> void: if i == 0: category_icon_button = icon_button icon_button.pressed.connect(on_category_icon_button_pressed) - icon_button.mini_texture.visible = true else: 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 options_icon_buttons: if icon_button == in_icon_button: - category_icon_button.mini_texture.texture = in_icon_button.image + if icon_button.apply_texture_on_selection: + category_icon_button.image = in_icon_button.image category_icon_button.data = in_icon_button.data on_option_changed.emit(icon_button.data) + if !icon_button.images.is_empty(): + icon_button.image = icon_button.images[0] if icon_button.image == icon_button.images[1] else icon_button.images[1] break func on_category_icon_button_pressed() -> void: diff --git a/core/main_scene_ui/icon_buttons_row.tscn b/core/main_scene_ui/icon_buttons_row.tscn index 0cfbc0a..9a8dd2d 100644 --- a/core/main_scene_ui/icon_buttons_row.tscn +++ b/core/main_scene_ui/icon_buttons_row.tscn @@ -5,7 +5,8 @@ [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) +offset_right = 80.0 +offset_bottom = 80.0 size_flags_vertical = 3 script = ExtResource("1_xq3mw") diff --git a/core/main_scene_ui/main_scene_ui.gd b/core/main_scene_ui/main_scene_ui.gd index 52ac452..1e7f120 100644 --- a/core/main_scene_ui/main_scene_ui.gd +++ b/core/main_scene_ui/main_scene_ui.gd @@ -1,6 +1,5 @@ extends Control -enum Weather {RAIN, SNOW} @onready var game_menu: Control = $%GameMenu @onready var game_menu_panel: Control = $%GameMenuPanel @@ -8,21 +7,35 @@ enum Weather {RAIN, SNOW} @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 +@onready var time_of_day_row: HBoxContainer = $%TimeOfDayRow +@onready var photo_mode_texture_panel: Panel = $%PhotoModeTexturePanel +@onready var photo_mode_texture_mask: TextureRect = $%PhotoModeTextureMask +@onready var photo_mode_black_screen: ColorRect = $%PhotoModeBlackScreen +@onready var audio_player: Control = $%AudioPlayer + +var cycle = false +var _photo_mode_mat_tween: Tween +var _photo_mode_alpha_tween: Tween +var _photo_mode_fold_tween: Tween func _ready() -> void: + GameState.on_enable_photo_mode_request.connect(_on_enable_photo_mode) + GameState.on_disable_photo_mode_request.connect(_on_disable_photo_mode) + GameState.on_photo_taken_started.connect(_on_photo_taken_started) + GameState.on_photo_taken_finished.connect(_on_photo_taken_finished) + GameState.on_photo_taken_prepare.connect(_on_photo_capture_prepare) 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() + game_menu.scale = Vector2(1, 1) + game_menu.open() + TweenFX.fold_in(game_menu) func _on_photo_icon_button_pressed() -> void: GameState.on_enable_photo_mode_request.emit() @@ -31,11 +44,12 @@ 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() + game_menu.scale = Vector2(1, 1) + TweenFX.fold_in(game_menu) func _on_resume_button_pressed() -> void: - hide_container_tween.start_tween() - await hide_container_tween.finished + var tween = TweenFX.fold_out(game_menu) + await tween.finished game_menu_panel.hide() GameState.resume_game() @@ -45,10 +59,11 @@ func _on_time_of_day_row_on_option_changed(data: String) -> void: 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) + "Cycle": + cycle = !cycle + UIEvents.toggle_pause_daytime.emit(cycle) _: pass @@ -76,3 +91,92 @@ func pick_random_weather() -> void: if valid_buttons.size() > 0: var random_button = valid_buttons.pick_random() weather_row.on_icon_pressed_changed(random_button) + +func _on_enable_photo_mode() -> void: + hide_ui_for_photo_mode() + photo_mode_texture_mask.scale = Vector2(1,1) + photo_mode_texture_mask.modulate.a = 0.0 + photo_mode_texture_panel.show() + + var mat = photo_mode_texture_panel.material as ShaderMaterial + if mat: + mat.set_shader_parameter("hole_size", Vector2(0.72, 0.0)) + if _photo_mode_mat_tween: + _photo_mode_mat_tween.kill() + _photo_mode_mat_tween = create_tween() + _photo_mode_mat_tween.tween_property(mat, "shader_parameter/hole_size", Vector2(0.72, 0.806), 0.3).set_trans(Tween.TRANS_BACK).set_ease(Tween.EASE_OUT) + + if _photo_mode_alpha_tween: + _photo_mode_alpha_tween.kill() + _photo_mode_alpha_tween = create_tween() + _photo_mode_alpha_tween.tween_property(photo_mode_texture_mask, "modulate:a", 1.0, 0.3).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT) + + if _photo_mode_fold_tween: + _photo_mode_fold_tween.kill() + _photo_mode_fold_tween = TweenFX.fold_in(photo_mode_texture_mask) + +func _on_disable_photo_mode() -> void: + show_ui_for_photo_mode() + var mat = photo_mode_texture_panel.material as ShaderMaterial + if mat: + if _photo_mode_mat_tween: + _photo_mode_mat_tween.kill() + _photo_mode_mat_tween = create_tween() + _photo_mode_mat_tween.tween_property(mat, "shader_parameter/hole_size", Vector2(0.72, 0.0), 0.3).set_trans(Tween.TRANS_BACK).set_ease(Tween.EASE_IN) + + if _photo_mode_alpha_tween: + _photo_mode_alpha_tween.kill() + _photo_mode_alpha_tween = create_tween() + _photo_mode_alpha_tween.tween_property(photo_mode_texture_mask, "modulate:a", 0.0, 0.3).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_IN) + + if _photo_mode_fold_tween: + _photo_mode_fold_tween.kill() + _photo_mode_fold_tween = TweenFX.fold_out(photo_mode_texture_mask) + + if _photo_mode_fold_tween: + await _photo_mode_fold_tween.finished + + photo_mode_texture_panel.hide() + +func _on_photo_capture_prepare() -> void: + photo_mode_texture_panel.hide() + photo_mode_texture_mask.hide() + +func _on_photo_taken_started() -> void: + photo_mode_texture_panel.show() + photo_mode_texture_mask.show() + + photo_mode_black_screen.scale = Vector2(1,1) + photo_mode_black_screen.show() + var tween = TweenFX.fold_in(photo_mode_black_screen) + await tween.finished + await RenderingServer.frame_post_draw + GameState.on_photo_taken_making.emit() + +func _on_photo_taken_finished() -> void: + var tween = TweenFX.fold_out(photo_mode_black_screen) + await tween.finished + photo_mode_black_screen.hide() + GameState.on_photo_mode_black_screen_disappeared.emit() + +func hide_ui_for_photo_mode() -> void: + TweenFX.fade_out(weather_row, 0.25) + TweenFX.fade_out(time_of_day_row, 0.25) + TweenFX.fade_out(menu_icon_button, 0.25) + TweenFX.fade_out(photo_icon_button, 0.25) + TweenFX.fade_out(collectible_icon_button, 0.25) + TweenFX.fade_out(audio_player, 0.25) + +func show_ui_for_photo_mode() -> void: + weather_row.show() + time_of_day_row.show() + menu_icon_button.show() + photo_icon_button.show() + collectible_icon_button.show() + audio_player.show() + TweenFX.fade_in(weather_row, 0.25) + TweenFX.fade_in(time_of_day_row, 0.25) + TweenFX.fade_in(menu_icon_button, 0.25) + TweenFX.fade_in(photo_icon_button, 0.25) + TweenFX.fade_in(collectible_icon_button, 0.25) + TweenFX.fade_in(audio_player, 0.25) diff --git a/core/main_scene_ui/main_scene_ui.tscn b/core/main_scene_ui/main_scene_ui.tscn index 3aa0864..2126d86 100644 --- a/core/main_scene_ui/main_scene_ui.tscn +++ b/core/main_scene_ui/main_scene_ui.tscn @@ -2,12 +2,34 @@ [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="Texture2D" uid="uid://ccylkmwm2nb6q" path="res://core/main_scene_ui/assets/button_chrono_sunset.png" id="3_kd244"] [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="Texture2D" uid="uid://24p0rdm86cn" path="res://core/main_scene_ui/assets/button_chrono_day.png" id="4_lapqe"] +[ext_resource type="Texture2D" uid="uid://y12wqk2bkoi1" path="res://core/main_scene_ui/assets/button_daynightcycle.png" id="5_fjfwt"] [ext_resource type="PackedScene" uid="uid://cpeyt1dgrtglc" path="res://core/radio/radio.tscn" id="5_nevjt"] +[ext_resource type="Texture2D" uid="uid://blttomjog2rin" path="res://core/main_scene_ui/assets/button_weather_nosnow.png" id="6_167gj"] [ext_resource type="AudioStream" uid="uid://70cc8she43re" path="res://docs/gyms/radio/lofi_01.ogg" id="6_kd244"] +[ext_resource type="Texture2D" uid="uid://bj0idkr7kd4ik" path="res://core/main_scene_ui/assets/button_weather_snow.png" id="6_xykej"] +[ext_resource type="Texture2D" uid="uid://cc6e2piksgv1a" path="res://core/main_scene_ui/assets/button_weather01.png" id="6_yggu7"] +[ext_resource type="Texture2D" uid="uid://d3v43kog5fwnf" path="res://core/main_scene_ui/assets/button_weather_rain.png" id="7_jpmw5"] [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"] +[ext_resource type="Texture2D" uid="uid://b4t4nvejvi0su" path="res://core/main_scene_ui/assets/button_weather_norain.png" id="8_c5e3i"] +[ext_resource type="Texture2D" uid="uid://c7tkn1gj7iuqp" path="res://core/main_scene_ui/assets/button_weather_storm.png" id="8_i1mwp"] +[ext_resource type="PackedScene" uid="uid://cifadwamy04ko" path="res://core/main_scene_ui/photo_taken.tscn" id="8_t1xop"] +[ext_resource type="Texture2D" uid="uid://dcsy5yawnlxhq" path="res://core/photo_mode/assets/reticolo.png" id="9_4cc8f"] +[ext_resource type="Texture2D" uid="uid://b7h2kc3o86rv2" path="res://core/main_scene_ui/assets/button_settings.png" id="10_6016m"] +[ext_resource type="Shader" uid="uid://dudbt51v33tt7" path="res://core/main_scene_ui/center_hole.gdshader" id="10_shader"] +[ext_resource type="Texture2D" uid="uid://wxla636wypht" path="res://core/main_scene_ui/assets/button_weather_nostorm.png" id="10_th1nj"] +[ext_resource type="Texture2D" uid="uid://k75acvihjf1h" path="res://core/main_scene_ui/assets/button_weather_wind.png" id="11_gcgq4"] +[ext_resource type="Texture2D" uid="uid://cq65xyg4wsctm" path="res://core/main_scene_ui/assets/button_weather_nowind.png" id="12_fjfwt"] +[ext_resource type="Texture2D" uid="uid://tex06svipyg4" path="res://core/main_scene_ui/assets/button_random.png" id="14_gcgq4"] +[ext_resource type="Texture2D" uid="uid://1n3paucfsovj" path="res://core/main_scene_ui/assets/button_photomode.png" id="15_th1nj"] +[ext_resource type="Texture2D" uid="uid://b03si5ir3ypp7" path="res://core/main_scene_ui/assets/button_collection03.png" id="19_yggu7"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_hole"] +shader = ExtResource("10_shader") +shader_parameter/hole_size = Vector2(0.72, 0.806) [node name="MainSceneUi" type="Control" unique_id=1359391222] process_mode = 3 @@ -19,68 +41,94 @@ grow_horizontal = 2 grow_vertical = 2 script = ExtResource("1_h43jo") -[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=2071886807] -custom_minimum_size = Vector2(160, 320) +[node name="Rows" type="VBoxContainer" parent="." unique_id=2071886807] +custom_minimum_size = Vector2(80, 160) layout_mode = 1 anchors_preset = 2 anchor_top = 1.0 anchor_bottom = 1.0 -offset_top = -320.0 -offset_right = 160.0 +offset_top = -164.0 +offset_right = 80.0 grow_vertical = 0 -[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] -data = "Sunrise" - -[node name="IconButton3" parent="VBoxContainer/TimeOfDayRow" index="2" unique_id=1662483962] -data = "Day" - -[node name="IconButton4" parent="VBoxContainer/TimeOfDayRow" index="3" unique_id=1375190490] -data = "Sunset" - -[node name="IconButton5" parent="VBoxContainer/TimeOfDayRow" index="4" unique_id=315412403] -data = "Night" - -[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")] +[node name="TimeOfDayRow" parent="Rows" unique_id=1734127019 instance=ExtResource("2_4cc8f")] unique_name_in_owner = true layout_mode = 2 -[node name="IconButton2" parent="VBoxContainer/WeatherRow" index="1" unique_id=638856991] +[node name="IconButton" parent="Rows/TimeOfDayRow" index="0" unique_id=1750448019] +apply_texture_on_selection = false + +[node name="IconButton2" parent="Rows/TimeOfDayRow" index="1" unique_id=638856991] +data = "Sunrise" +image = ExtResource("3_kd244") + +[node name="IconButton3" parent="Rows/TimeOfDayRow" index="2" unique_id=1662483962] +data = "Day" +image = ExtResource("4_lapqe") + +[node name="IconButton4" parent="Rows/TimeOfDayRow" index="3" unique_id=1375190490] +data = "Night" + +[node name="IconButton5" parent="Rows/TimeOfDayRow" index="4" unique_id=315412403] +data = "Cycle" +image = ExtResource("5_fjfwt") +apply_texture_on_selection = false + +[node name="ShowContainerTween" parent="Rows/TimeOfDayRow" index="5" unique_id=160227524] +tween_types = Array[String](["impact_land", "fade_in"]) + +[node name="HideContainerTween" parent="Rows/TimeOfDayRow" index="6" unique_id=1169748375] +tween_types = Array[String](["impact_land", "fade_out"]) + +[node name="WeatherRow" parent="Rows" unique_id=1803637359 instance=ExtResource("2_4cc8f")] +unique_name_in_owner = true +layout_mode = 2 + +[node name="IconButton" parent="Rows/WeatherRow" index="0" unique_id=1750448019] +image = ExtResource("6_yggu7") +apply_texture_on_selection = false + +[node name="IconButton2" parent="Rows/WeatherRow" index="1" unique_id=638856991] data = "Snow" +image = ExtResource("6_xykej") +images = Array[Texture]([ExtResource("6_xykej"), ExtResource("6_167gj")]) +apply_texture_on_selection = false -[node name="IconButton3" parent="VBoxContainer/WeatherRow" index="2" unique_id=1662483962] +[node name="IconButton3" parent="Rows/WeatherRow" index="2" unique_id=1662483962] data = "Rain" +image = ExtResource("7_jpmw5") +images = Array[Texture]([ExtResource("7_jpmw5"), ExtResource("8_c5e3i")]) +apply_texture_on_selection = false -[node name="IconButton4" parent="VBoxContainer/WeatherRow" index="3" unique_id=1375190490] +[node name="IconButton4" parent="Rows/WeatherRow" index="3" unique_id=1375190490] data = "Storm" +image = ExtResource("8_i1mwp") +images = Array[Texture]([ExtResource("8_i1mwp"), ExtResource("10_th1nj")]) +apply_texture_on_selection = false -[node name="IconButton5" parent="VBoxContainer/WeatherRow" index="4" unique_id=315412403] +[node name="IconButton5" parent="Rows/WeatherRow" index="4" unique_id=315412403] data = "Wind" +image = ExtResource("11_gcgq4") +images = Array[Texture]([ExtResource("11_gcgq4"), ExtResource("12_fjfwt")]) +apply_texture_on_selection = false -[node name="ShowContainerTween" parent="VBoxContainer/WeatherRow" index="5" unique_id=160227524 node_paths=PackedStringArray("targets")] +[node name="ShowContainerTween" parent="Rows/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")] +[node name="HideContainerTween" parent="Rows/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")] +[node name="IconButton6" parent="Rows/WeatherRow" unique_id=218253485 instance=ExtResource("3_t1xop")] unique_name_in_owner = true visible = false layout_mode = 2 size_flags_horizontal = 0 size_flags_vertical = 3 data = "Random" +image = ExtResource("14_gcgq4") +apply_texture_on_selection = false [node name="MenuIconButton" parent="." unique_id=707872474 instance=ExtResource("3_t1xop")] unique_name_in_owner = true @@ -89,8 +137,10 @@ anchors_preset = 1 anchor_left = 1.0 anchor_right = 1.0 anchor_bottom = 0.0 -offset_left = -160.0 +offset_left = -80.0 +offset_bottom = 80.0 grow_horizontal = 0 +image = ExtResource("10_6016m") [node name="CollectionOptions" type="VBoxContainer" parent="." unique_id=542153805] layout_mode = 1 @@ -108,18 +158,20 @@ grow_vertical = 2 [node name="PhotoIconButton" parent="CollectionOptions" unique_id=1863476241 instance=ExtResource("3_t1xop")] unique_name_in_owner = true layout_mode = 2 +image = ExtResource("15_th1nj") [node name="CollectibleIconButton" parent="CollectionOptions" unique_id=520235552 instance=ExtResource("3_t1xop")] unique_name_in_owner = true layout_mode = 2 +image = ExtResource("19_yggu7") [node name="AudioPlayer" parent="." unique_id=425192018 node_paths=PackedStringArray("radio") instance=ExtResource("7_lapqe")] +unique_name_in_owner = true layout_mode = 1 -anchors_preset = 3 anchor_left = 1.0 -anchor_top = 1.0 +anchor_top = 0.99814814 anchor_right = 1.0 -anchor_bottom = 1.0 +anchor_bottom = 0.99814814 offset_left = -146.0 offset_top = -57.0 offset_right = -146.0 @@ -137,31 +189,69 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +pivot_offset_ratio = Vector2(0.5, 0.5) [node name="GameMenu" parent="GameMenuPanel" unique_id=2124096517 instance=ExtResource("4_jh36j")] unique_name_in_owner = true layout_mode = 1 +[node name="PhotoModeTexturePanel" type="Panel" parent="." unique_id=901556197] +unique_name_in_owner = true +visible = false +material = SubResource("ShaderMaterial_hole") +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +pivot_offset_ratio = Vector2(0.5, 0.5) + +[node name="PhotoModeTextureMask" type="TextureRect" parent="PhotoModeTexturePanel" unique_id=1377788813] +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_ratio = Vector2(0.5, 0.5) +texture = ExtResource("9_4cc8f") +stretch_mode = 3 +metadata/_edit_use_anchors_ = true + +[node name="PhotoModeBlackScreen" type="ColorRect" parent="." unique_id=1928591477] +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 +pivot_offset_ratio = Vector2(0.5, 0.5) +color = Color(0, 0, 0, 1) + +[node name="PhotoTaken" parent="." unique_id=683693112 instance=ExtResource("8_t1xop")] +visible = false +layout_mode = 1 +anchor_left = 0.465625 +anchor_top = 0.4287037 +anchor_right = 0.534375 +anchor_bottom = 0.5712963 +offset_right = 0.0 +offset_bottom = 0.0 +grow_horizontal = 2 +grow_vertical = 2 + [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 +[connection signal="on_option_changed" from="Rows/TimeOfDayRow" to="." method="_on_time_of_day_row_on_option_changed"] +[connection signal="on_option_changed" from="Rows/WeatherRow" to="." method="_on_weather_row_on_option_changed"] -[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"] - -[editable path="VBoxContainer/TimeOfDayRow"] -[editable path="VBoxContainer/WeatherRow"] +[editable path="Rows/TimeOfDayRow"] +[editable path="Rows/WeatherRow"] [editable path="GameMenuPanel/GameMenu"] [editable path="GameMenuPanel/GameMenu/Pages/Page3"] [editable path="GameMenuPanel/GameMenu/Pages/Page3/OptionMenu"] diff --git a/core/main_scene_ui/photo_taken.gd b/core/main_scene_ui/photo_taken.gd new file mode 100644 index 0000000..f89ceb2 --- /dev/null +++ b/core/main_scene_ui/photo_taken.gd @@ -0,0 +1,102 @@ +extends Control + +@onready var photo_texture: TextureRect = $%PhotoTexture +@onready var collectible_button: Control = get_parent().get_node_or_null("%CollectibleIconButton") + +var initial_pos_saved := false +var initial_pos: Vector2 +var move_tween: Tween +var is_photo_mode_enable = false +var current_execution: int = 0 + +func _ready() -> void: + CollectionManager.on_photo_saved.connect(_set_photo_taken) + GameState.on_enable_photo_mode_request.connect(_on_enable_photo_mode) + GameState.on_disable_photo_mode_request.connect(_on_disable_photo_mode) + GameState.on_photo_taken_finished.connect(_show_photo_taken) + GameState.on_photo_taken_prepare.connect(_hide_photo_taken) + +func _hide_photo_taken() -> void: + hide() + +func _set_photo_taken(file_path) -> void: + var image = Image.load_from_file(file_path) + if image: + var texture = ImageTexture.create_from_image(image) + photo_texture.texture = texture + +func _show_photo_taken() -> void: + current_execution += 1 + var my_execution = current_execution + + reset() + + if not initial_pos_saved: + initial_pos = global_position + initial_pos_saved = true + + global_position = initial_pos + scale = Vector2(1,1) + modulate.a = 1.0 + rotation_degrees = 0.0 + show() + + var explode_tween_duration = 5.5 + var move_tween_duration = 1.0 + + var explode_tween = TweenFX.explode(self, explode_tween_duration, 3) + + await get_tree().create_timer(explode_tween_duration / 2).timeout + + if my_execution != current_execution: + return + + if not is_photo_mode_enable: + return + + collectible_button.scale = Vector2(1,1) + collectible_button.show() + collectible_button.modulate.a = 1 + TweenFX.fold_in(collectible_button, 1) + + move_tween = create_tween() + var target_pos = collectible_button.global_position + move_tween.tween_property(self, "global_position:x", target_pos.x, move_tween_duration).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_IN_OUT) + move_tween.parallel().tween_property(self, "global_position:y", target_pos.y, move_tween_duration).set_trans(Tween.TRANS_BACK).set_ease(Tween.EASE_IN) + + await explode_tween.finished + + if my_execution != current_execution: + return + + var fold_out_tween = TweenFX.fold_out(collectible_button) + if fold_out_tween: + await fold_out_tween.finished + + if my_execution != current_execution: + return + + hide() + collectible_button.scale = Vector2(1,1) + collectible_button.modulate.a = 1 + collectible_button.hide() + +func _on_enable_photo_mode() -> void: + is_photo_mode_enable = true + +func _on_disable_photo_mode() -> void: + is_photo_mode_enable = false + reset() + +func reset() -> void: + TweenFX.stop_all(self) + if move_tween: + move_tween.kill() + hide() + + if collectible_button: + TweenFX.stop_all(collectible_button) + collectible_button.scale = Vector2(1,1) + if is_photo_mode_enable: + collectible_button.modulate.a = 1 + collectible_button.hide() diff --git a/core/main_scene_ui/photo_taken.gd.uid b/core/main_scene_ui/photo_taken.gd.uid new file mode 100644 index 0000000..342288c --- /dev/null +++ b/core/main_scene_ui/photo_taken.gd.uid @@ -0,0 +1 @@ +uid://dyye4efo503ih diff --git a/core/main_scene_ui/photo_taken.tscn b/core/main_scene_ui/photo_taken.tscn new file mode 100644 index 0000000..77c2c40 --- /dev/null +++ b/core/main_scene_ui/photo_taken.tscn @@ -0,0 +1,48 @@ +[gd_scene format=3 uid="uid://cifadwamy04ko"] + +[ext_resource type="Script" uid="uid://dyye4efo503ih" path="res://core/main_scene_ui/photo_taken.gd" id="1_1n86s"] + +[node name="PhotoTaken" type="Control" unique_id=683693112] +custom_minimum_size = Vector2(132, 154) +layout_mode = 3 +anchor_right = 0.06875 +anchor_bottom = 0.1425926 +offset_right = -132.0 +offset_bottom = -154.0 +pivot_offset_ratio = Vector2(0.5, 0.5) +script = ExtResource("1_1n86s") +metadata/_edit_use_anchors_ = true + +[node name="ColorRect" type="ColorRect" parent="." unique_id=1876357733] +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 +grow_horizontal = 2 +grow_vertical = 2 +pivot_offset_ratio = Vector2(0.5, 0.5) +mouse_filter = 2 +metadata/_edit_use_anchors_ = true + +[node name="MarginContainer" type="MarginContainer" parent="ColorRect" unique_id=405077013] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/margin_left = 14 +theme_override_constants/margin_top = 15 +theme_override_constants/margin_right = 14 +theme_override_constants/margin_bottom = 50 + +[node name="PhotoTexture" type="TextureRect" parent="ColorRect/MarginContainer" unique_id=1754898569] +unique_name_in_owner = true +layout_mode = 2 +size_flags_vertical = 3 +mouse_filter = 2 +expand_mode = 1 +stretch_mode = 6 diff --git a/core/photo_mode/assets/reticolo.png b/core/photo_mode/assets/reticolo.png new file mode 100644 index 0000000..5c11dad Binary files /dev/null and b/core/photo_mode/assets/reticolo.png differ diff --git a/core/main_scene_ui/assets/weather_test.png.import b/core/photo_mode/assets/reticolo.png.import similarity index 72% rename from core/main_scene_ui/assets/weather_test.png.import rename to core/photo_mode/assets/reticolo.png.import index dc6062e..39736ff 100644 --- a/core/main_scene_ui/assets/weather_test.png.import +++ b/core/photo_mode/assets/reticolo.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://dldg826x1kkoe" -path="res://.godot/imported/weather_test.png-b32f5910d510365f593b180d50dbe815.ctex" +uid="uid://dcsy5yawnlxhq" +path="res://.godot/imported/reticolo.png-dba8a0c9eb8601e74902df2dc1fc51e5.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://core/main_scene_ui/assets/weather_test.png" -dest_files=["res://.godot/imported/weather_test.png-b32f5910d510365f593b180d50dbe815.ctex"] +source_file="res://core/photo_mode/assets/reticolo.png" +dest_files=["res://.godot/imported/reticolo.png-dba8a0c9eb8601e74902df2dc1fc51e5.ctex"] [params] diff --git a/core/photo_mode/managers/collection_manager.gd b/core/photo_mode/managers/collection_manager.gd index 3d3a2b3..2b61537 100644 --- a/core/photo_mode/managers/collection_manager.gd +++ b/core/photo_mode/managers/collection_manager.gd @@ -31,9 +31,10 @@ func get_all_collectibles() -> Array[CollectibleResource]: func get_unlocked_collectible_ids() -> Array[StringName]: return unlocked_collectibles_ids -func save_photo_to_disk_async() -> void: - await RenderingServer.frame_post_draw - var image = get_viewport().get_texture().get_image() +func save_photo_to_disk_async(image: Image) -> void: + if not image: + return + if not DirAccess.dir_exists_absolute("user://photos"): DirAccess.make_dir_absolute("user://photos") diff --git a/core/photo_mode/runtime/photo_mode_controller.gd b/core/photo_mode/runtime/photo_mode_controller.gd index 038cf0a..56ff512 100644 --- a/core/photo_mode/runtime/photo_mode_controller.gd +++ b/core/photo_mode/runtime/photo_mode_controller.gd @@ -18,12 +18,24 @@ var current_pan: Vector2 = Vector2.ZERO var is_active: bool = false var previous_camera: Camera3D +@export_group("Isometric Zoom") +@export var normal_size : float = 35.0 +@export var zoom_size : float = 60.0 +@export var zoom_time : float = 1.2 +var is_zoomed : bool = false +var zoom_tween : Tween + var initial_local_pos: Vector3 var initial_local_basis: Basis +var is_making_photo = false +var captured_image: Image + func _ready() -> void: GameState.on_enable_photo_mode_request.connect(enable_photo_mode) GameState.on_disable_photo_mode_request.connect(disable_photo_mode) + GameState.on_photo_taken_making.connect(take_photo_async) + GameState.on_photo_mode_black_screen_disappeared.connect(_on_photo_mode_black_screen_disappeared) initial_local_pos = position initial_local_basis = basis @@ -46,17 +58,42 @@ func disable_photo_mode() -> void: previous_camera.make_current() func _input(event: InputEvent) -> void: + if event is InputEventKey and event.pressed and not event.echo: + if event.keycode == KEY_Z and camera: + is_zoomed = !is_zoomed + var target_size = zoom_size if is_zoomed else normal_size + + if zoom_tween and zoom_tween.is_valid(): + zoom_tween.kill() + + zoom_tween = create_tween() + zoom_tween.set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_IN_OUT) + zoom_tween.tween_property(camera, "size", target_size, zoom_time) + zoom_tween.parallel().tween_property(camera, "fov", target_size, zoom_time) + if event.is_action_pressed("toggle_photo_mode"): + if get_tree().paused: + return if not is_active: - enable_photo_mode() + GameState.on_enable_photo_mode_request.emit() else: - disable_photo_mode() + if not is_making_photo: + GameState.on_disable_photo_mode_request.emit() if event is InputEventMouseMotion and is_active: total_yaw -= event.relative.x * rotation_speed if event.is_action_pressed("take_photo"): - take_photo_async() + if !is_active or is_making_photo: + return + is_making_photo = true + + GameState.on_photo_taken_prepare.emit() + + await RenderingServer.frame_post_draw + captured_image = get_viewport().get_texture().get_image() + + GameState.on_photo_taken_started.emit() func _process(delta: float) -> void: if not is_active: @@ -81,13 +118,10 @@ func _process(delta: float) -> void: basis = rotated_basis.orthonormalized() func take_photo_async() -> void: - if !is_active: - return - var targets = get_tree().get_nodes_in_group("collectible") var space_state = get_world_3d().direct_space_state - await CollectionManager.save_photo_to_disk_async() + CollectionManager.save_photo_to_disk_async(captured_image) for target in targets: if not target.collectible_data: @@ -104,3 +138,7 @@ func take_photo_async() -> void: CollectionManager.unlock_collectible(target.collectible_data.id) GameState.save_game() + GameState.on_photo_taken_finished.emit() + +func _on_photo_mode_black_screen_disappeared() -> void: + is_making_photo = false diff --git a/core/tween/container_tween.gd b/core/tween/container_tween.gd index f230e09..31e2650 100644 --- a/core/tween/container_tween.gd +++ b/core/tween/container_tween.gd @@ -20,6 +20,7 @@ enum AnimateOrder { @export var show_on_start: bool = false @export var hide_on_finish: bool = false @export var reset_state_on_start: bool = true +@export var max_targets: int = 9 var _tween_generation: int = 0 var is_running: bool = false @@ -51,6 +52,9 @@ func start_tween() -> void: return if is_instance_valid(target): + target.set_meta("pre_tween_mouse_filter", target.mouse_filter) + target.mouse_filter = Control.MOUSE_FILTER_IGNORE + if reset_state_on_start: target.scale = Vector2.ONE target.modulate.a = 1.0 @@ -74,6 +78,7 @@ func start_tween() -> void: if current_gen == _tween_generation: is_running = false + _restore_mouse_filters(sorted_targets) finished.emit() @@ -81,22 +86,31 @@ func stop_tween() -> void: is_running = false _tween_generation += 1 var current_targets: Array[Control] = _get_current_targets() + _restore_mouse_filters(current_targets) for target in current_targets: if is_instance_valid(target): TweenFX.stop_all(target) +func _restore_mouse_filters(targets_array: Array[Control]) -> void: + for target in targets_array: + if is_instance_valid(target) and target.has_meta("pre_tween_mouse_filter"): + target.mouse_filter = target.get_meta("pre_tween_mouse_filter") + target.remove_meta("pre_tween_mouse_filter") + + func _get_current_targets() -> Array[Control]: - if !targets.is_empty(): - return targets.duplicate() - var current_targets: Array[Control] = [] - if runtime_target_parent == null: - return current_targets + + if not targets.is_empty(): + current_targets = targets.duplicate() + elif runtime_target_parent != null: + for child in runtime_target_parent.get_children(): + var target := child as Control + if target != null: + current_targets.append(target) - for child in runtime_target_parent.get_children(): - var target := child as Control - if target != null: - current_targets.append(target) + if max_targets > 0 and current_targets.size() > max_targets: + return current_targets.slice(0, max_targets) return current_targets