1 Commits

Author SHA1 Message Date
m.cirafisi
53e4afa367 bug fix 2026-07-09 22:14:29 +02:00
10 changed files with 102 additions and 12 deletions

View File

@@ -16,11 +16,32 @@ func _ready():
$%TextureRect.show()
else:
$%TextureRect.hide()
TweenFX.breathe(self, 1)
func _on_pressed() -> void:
if locked:
return
TweenFX.stop_all(self)
scale = Vector2.ONE
rotation = 0.0
modulate.a = 1.0
TweenFX.press_rotate(self)
func _on_mouse_entered() -> void:
if locked:
return
TweenFX.stop_all(self)
scale = Vector2.ONE
rotation = 0.0
modulate.a = 1.0
TweenFX.breathe(self, 1)
func _on_mouse_exited() -> void:
if locked:
return
TweenFX.stop_all(self)
scale = Vector2.ONE
rotation = 0.0
modulate.a = 1.0

View File

@@ -80,4 +80,6 @@ mouse_filter = 2
texture = ExtResource("3_jqji0")
expand_mode = 1
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]
[connection signal="pressed" from="." to="." method="_on_pressed"]

View File

@@ -6,19 +6,28 @@ func _ready() -> void:
GameState.on_game_resumed.connect(_on_game_resumed)
func show_page() -> void:
var tweens = find_children("*", "ContainerTween", true, false)
var tweens: Array[ContainerTween] = []
for child in find_children("*", "", true, false):
if child is ContainerTween:
tweens.append(child)
for tween in tweens:
tween.start_tween()
show()
func hide_page() -> void:
var tweens = find_children("*", "ContainerTween", true, false)
var tweens: Array[ContainerTween] = []
for child in find_children("*", "", true, false):
if child is ContainerTween:
tweens.append(child)
for tween in tweens:
tween.stop_tween()
hide()
func _on_game_resumed() -> void:
var tweens = find_children("*", "ContainerTween", true, false)
var tweens: Array[ContainerTween] = []
for child in find_children("*", "", true, false):
if child is ContainerTween:
tweens.append(child)
for tween in tweens:
tween.stop_tween()

View File

@@ -0,0 +1,13 @@
extends "res://core/game_menu/page_interactive.gd"
@onready var coming_soon_texture = $%ComingSoonTexture
func on_page_opened() -> void:
var anim = coming_soon_texture.texture
anim.current_frame = 0
anim.pause = false
func on_page_closed() -> void:
var anim = coming_soon_texture.texture as AnimatedTexture
anim.pause = true
anim.current_frame = 0

View File

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

View File

@@ -1,6 +1,6 @@
[gd_scene format=3 uid="uid://clno1ahv2byng"]
[ext_resource type="Script" uid="uid://0yyr318wl7co" path="res://core/game_menu/page_interactive.gd" id="1_script"]
[ext_resource type="Script" uid="uid://pkvsjrnsteuk" path="res://core/game_menu/page_2_right.gd" id="1_71v1w"]
[ext_resource type="Texture2D" uid="uid://xfl3ks4dbfaw" path="res://core/game_menu/assets/page_2/achievements_text.png" id="3_4uwhd"]
[ext_resource type="Texture2D" uid="uid://drwe2xcnp8vs1" path="res://core/game_menu/assets/page_2/2_dx.png" id="3_msl27"]
[ext_resource type="PackedScene" uid="uid://bvw086glfpcba" path="res://core/game_menu/collectible_gallery.tscn" id="5_w0bcg"]
@@ -15,6 +15,7 @@
[sub_resource type="AnimatedTexture" id="AnimatedTexture_0x02d"]
frames = 5
one_shot = true
frame_0/texture = ExtResource("8_71v1w")
frame_0/duration = 0.15
frame_1/texture = ExtResource("9_g7kul")
@@ -36,7 +37,7 @@ offset_bottom = -506.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
script = ExtResource("1_script")
script = ExtResource("1_71v1w")
[node name="PageBackground" type="TextureRect" parent="." unique_id=1387851649]
layout_mode = 1
@@ -108,7 +109,8 @@ texture = ExtResource("7_71v1w")
expand_mode = 1
stretch_mode = 5
[node name="TextureRect" type="TextureRect" parent="." unique_id=1942592146]
[node name="ComingSoonTexture" type="TextureRect" parent="." unique_id=1942592146]
unique_name_in_owner = true
layout_mode = 0
offset_left = 387.99997
offset_top = 224.00002

View File

@@ -6,9 +6,23 @@ func _ready() -> void:
manage_pageflip.connect(_on_manage_pageflip)
func _on_manage_pageflip(give_control: bool) -> void:
var tweens = find_children("*", "ContainerTween", true, false)
var tweens: Array[ContainerTween] = []
for child in find_children("*", "", true, false):
if child is ContainerTween:
tweens.append(child)
for tween in tweens:
if give_control:
tween.start_tween()
else:
tween.stop_tween()
else:
tween.start_tween()
if give_control:
on_page_closed()
else:
on_page_opened()
func on_page_opened() -> void:
pass
func on_page_closed() -> void:
pass

View File

@@ -158,4 +158,8 @@ color = Color(0.9098039, 0.6, 0.5529412, 1)
[node name="ContainerTween" parent="." unique_id=160227524 node_paths=PackedStringArray("targets") instance=ExtResource("10_i2rs1")]
unique_name_in_owner = true
targets = [null, NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker1"), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker2"), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker3"), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker4"), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker5"), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker6"), null]
targets = [NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker1"), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker2"), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker3"), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker4"), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker5"), NodePath("../TextureRect/MarginContainer/HBoxContainer/ColorPicker6")]
[node name="ContainerTween2" parent="." unique_id=97219846 node_paths=PackedStringArray("targets") instance=ExtResource("10_i2rs1")]
unique_name_in_owner = true
targets = [NodePath("../TextureRect2/MarginContainer/HBoxContainer2/ColorPicker7"), NodePath("../TextureRect2/MarginContainer/HBoxContainer2/ColorPicker8"), NodePath("../TextureRect2/MarginContainer/HBoxContainer2/ColorPicker9"), NodePath("../TextureRect2/MarginContainer/HBoxContainer2/ColorPicker10"), NodePath("../TextureRect2/MarginContainer/HBoxContainer2/ColorPicker11"), NodePath("../TextureRect2/MarginContainer/HBoxContainer2/ColorPicker12")]

View File

@@ -28,8 +28,10 @@ var _ui_hidden = false
var _photo_mode_mat_tween: Tween
var _photo_mode_alpha_tween: Tween
var _photo_mode_fold_tween: Tween
var _game_menu_base_scale: Vector2
func _ready() -> void:
_game_menu_base_scale = game_menu.scale
set_process_input(false)
GameState.on_enable_photo_mode_request.connect(_on_enable_photo_mode)
GameState.on_disable_photo_mode_request.connect(_on_disable_photo_mode)
@@ -86,13 +88,34 @@ func _on_photo_icon_button_pressed() -> void:
GameState.on_enable_photo_mode_request.emit()
func _open_game_menu_on_page(tab_index: int) -> void:
if TweenFX.is_playing(game_menu, TweenFX.Animations.FOLD_IN) or TweenFX.is_playing(game_menu, TweenFX.Animations.FOLD_OUT):
return
GameState.pause_game()
game_menu.on_tab_pressed(tab_index, true)
game_menu_panel.show()
game_menu.scale = Vector2(1, 1)
game_menu.scale = _game_menu_base_scale
TweenFX.fold_in(game_menu)
var book = BookAPI.get_current_book()
if is_instance_valid(book):
for slot in [book.get("_slot_1"), book.get("_slot_2")]:
if slot != null and slot.get_child_count() > 0:
var node = slot.get_child(-1)
if node.has_method("_on_manage_pageflip"):
node._on_manage_pageflip(false)
func _on_resume_button_pressed() -> void:
if TweenFX.is_playing(game_menu, TweenFX.Animations.FOLD_IN) or TweenFX.is_playing(game_menu, TweenFX.Animations.FOLD_OUT):
return
var book = BookAPI.get_current_book()
if is_instance_valid(book):
for slot in [book.get("_slot_1"), book.get("_slot_2")]:
if slot != null and slot.get_child_count() > 0:
var node = slot.get_child(-1)
if node.has_method("_on_manage_pageflip"):
node._on_manage_pageflip(true)
var tween = TweenFX.fold_out(game_menu)
await tween.finished
game_menu_panel.hide()

File diff suppressed because one or more lines are too long