Compare commits
4 Commits
0e1afcab0c
...
ui_fixes
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
53e4afa367 | ||
|
|
f61668c626 | ||
|
|
ccb410d5d6 | ||
|
|
7dc4d524da |
@@ -316,8 +316,19 @@ func select_day_time(normalized_time: float) -> void:
|
|||||||
#24:00 1.0000 3.0
|
#24:00 1.0000 3.0
|
||||||
|
|
||||||
if normalized_time < environment_config.sunrise:
|
if normalized_time < environment_config.sunrise:
|
||||||
#Sunrise: night → morning
|
#Sunrise: stay night → night to alba(afternoon) → alba to morning
|
||||||
day_time = 3.0 + (normalized_time / environment_config.sunrise) * 1.0 # 3.0 → 4.0
|
var part = environment_config.sunrise / 3.0
|
||||||
|
if normalized_time < part:
|
||||||
|
# Stay Night
|
||||||
|
day_time = 3.0
|
||||||
|
elif normalized_time < part * 2.0:
|
||||||
|
# Night to Alba (Afternoon)
|
||||||
|
var t = (normalized_time - part) / part
|
||||||
|
day_time = 3.0 - (t * 1.0) # 3.0 → 2.0
|
||||||
|
else:
|
||||||
|
# Alba (Afternoon) to Morning
|
||||||
|
var t = (normalized_time - part * 2.0) / part
|
||||||
|
day_time = 2.0 - (t * 1.0) # 2.0 → 1.0
|
||||||
elif normalized_time < environment_config.day:
|
elif normalized_time < environment_config.day:
|
||||||
#Morning: morning → afternoon
|
#Morning: morning → afternoon
|
||||||
var t: float = (normalized_time - environment_config.sunrise) / (environment_config.day - environment_config.sunrise)
|
var t: float = (normalized_time - environment_config.sunrise) / (environment_config.day - environment_config.sunrise)
|
||||||
@@ -342,10 +353,17 @@ func _update_clouds_lighting(normalized_time: float) -> void:
|
|||||||
return
|
return
|
||||||
|
|
||||||
if normalized_time < environment_config.sunrise:
|
if normalized_time < environment_config.sunrise:
|
||||||
# NOTTE / PRE-ALBA (Colori scuri, nessun rim light solare)
|
var part = environment_config.sunrise / 3.0
|
||||||
cloud_material.set_shader_parameter("cloud_color", Color("1a1c2e"))
|
if normalized_time < part * 2.0:
|
||||||
cloud_material.set_shader_parameter("shadow_color", Color("0d0e17"))
|
# NOTTE / PRE-ALBA (Colori scuri, nessun rim light solare)
|
||||||
cloud_material.set_shader_parameter("rim_color", Color("000000"))
|
cloud_material.set_shader_parameter("cloud_color", Color("1a1c2e"))
|
||||||
|
cloud_material.set_shader_parameter("shadow_color", Color("0d0e17"))
|
||||||
|
cloud_material.set_shader_parameter("rim_color", Color("000000"))
|
||||||
|
else:
|
||||||
|
# ALBA (uguale al tramonto)
|
||||||
|
cloud_material.set_shader_parameter("cloud_color", Color("fdf3e7"))
|
||||||
|
cloud_material.set_shader_parameter("shadow_color", Color("5c537a"))
|
||||||
|
cloud_material.set_shader_parameter("rim_color", Color("ff9e64"))
|
||||||
|
|
||||||
elif normalized_time < environment_config.day:
|
elif normalized_time < environment_config.day:
|
||||||
# MATTINA / ALBA (Colori che iniziano a scaldarsi)
|
# MATTINA / ALBA (Colori che iniziano a scaldarsi)
|
||||||
|
|||||||
BIN
core/game_menu/assets/page_3/play_button_2.png
Normal file
BIN
core/game_menu/assets/page_3/play_button_2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
40
core/game_menu/assets/page_3/play_button_2.png.import
Normal file
40
core/game_menu/assets/page_3/play_button_2.png.import
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://kuqxyqwqdrq0"
|
||||||
|
path="res://.godot/imported/play_button_2.png-c01ddb1aeca349285eb93a0bb8d21b97.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://core/game_menu/assets/page_3/play_button_2.png"
|
||||||
|
dest_files=["res://.godot/imported/play_button_2.png-c01ddb1aeca349285eb93a0bb8d21b97.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
|
||||||
BIN
core/game_menu/assets/page_3/quit_button_2.png
Normal file
BIN
core/game_menu/assets/page_3/quit_button_2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 75 KiB |
40
core/game_menu/assets/page_3/quit_button_2.png.import
Normal file
40
core/game_menu/assets/page_3/quit_button_2.png.import
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://diqsj3x0ftdo"
|
||||||
|
path="res://.godot/imported/quit_button_2.png-a64c0ab5cbea6b10b86c94631528b175.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://core/game_menu/assets/page_3/quit_button_2.png"
|
||||||
|
dest_files=["res://.godot/imported/quit_button_2.png-a64c0ab5cbea6b10b86c94631528b175.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
|
||||||
BIN
core/game_menu/assets/page_3/settings_button_2.png
Normal file
BIN
core/game_menu/assets/page_3/settings_button_2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 162 KiB |
40
core/game_menu/assets/page_3/settings_button_2.png.import
Normal file
40
core/game_menu/assets/page_3/settings_button_2.png.import
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c010wpjb66cmb"
|
||||||
|
path="res://.godot/imported/settings_button_2.png-5ff07ad2e8705a51cc1173bc788b44c9.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://core/game_menu/assets/page_3/settings_button_2.png"
|
||||||
|
dest_files=["res://.godot/imported/settings_button_2.png-5ff07ad2e8705a51cc1173bc788b44c9.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
|
||||||
@@ -16,11 +16,32 @@ func _ready():
|
|||||||
$%TextureRect.show()
|
$%TextureRect.show()
|
||||||
else:
|
else:
|
||||||
$%TextureRect.hide()
|
$%TextureRect.hide()
|
||||||
TweenFX.breathe(self, 1)
|
|
||||||
|
|
||||||
|
|
||||||
func _on_pressed() -> void:
|
func _on_pressed() -> void:
|
||||||
|
if locked:
|
||||||
|
return
|
||||||
TweenFX.stop_all(self)
|
TweenFX.stop_all(self)
|
||||||
scale = Vector2.ONE
|
scale = Vector2.ONE
|
||||||
rotation = 0.0
|
rotation = 0.0
|
||||||
modulate.a = 1.0
|
modulate.a = 1.0
|
||||||
TweenFX.press_rotate(self)
|
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
|
||||||
|
|||||||
@@ -80,4 +80,6 @@ mouse_filter = 2
|
|||||||
texture = ExtResource("3_jqji0")
|
texture = ExtResource("3_jqji0")
|
||||||
expand_mode = 1
|
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"]
|
[connection signal="pressed" from="." to="." method="_on_pressed"]
|
||||||
|
|||||||
@@ -6,19 +6,28 @@ func _ready() -> void:
|
|||||||
GameState.on_game_resumed.connect(_on_game_resumed)
|
GameState.on_game_resumed.connect(_on_game_resumed)
|
||||||
|
|
||||||
func show_page() -> void:
|
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:
|
for tween in tweens:
|
||||||
tween.start_tween()
|
tween.start_tween()
|
||||||
show()
|
show()
|
||||||
|
|
||||||
|
|
||||||
func hide_page() -> void:
|
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:
|
for tween in tweens:
|
||||||
tween.stop_tween()
|
tween.stop_tween()
|
||||||
hide()
|
hide()
|
||||||
|
|
||||||
func _on_game_resumed() -> void:
|
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:
|
for tween in tweens:
|
||||||
tween.stop_tween()
|
tween.stop_tween()
|
||||||
|
|||||||
13
core/game_menu/page_2_right.gd
Normal file
13
core/game_menu/page_2_right.gd
Normal 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
|
||||||
1
core/game_menu/page_2_right.gd.uid
Normal file
1
core/game_menu/page_2_right.gd.uid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
uid://pkvsjrnsteuk
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
[gd_scene format=3 uid="uid://clno1ahv2byng"]
|
[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://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="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"]
|
[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"]
|
[sub_resource type="AnimatedTexture" id="AnimatedTexture_0x02d"]
|
||||||
frames = 5
|
frames = 5
|
||||||
|
one_shot = true
|
||||||
frame_0/texture = ExtResource("8_71v1w")
|
frame_0/texture = ExtResource("8_71v1w")
|
||||||
frame_0/duration = 0.15
|
frame_0/duration = 0.15
|
||||||
frame_1/texture = ExtResource("9_g7kul")
|
frame_1/texture = ExtResource("9_g7kul")
|
||||||
@@ -36,7 +37,7 @@ offset_bottom = -506.0
|
|||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
script = ExtResource("1_script")
|
script = ExtResource("1_71v1w")
|
||||||
|
|
||||||
[node name="PageBackground" type="TextureRect" parent="." unique_id=1387851649]
|
[node name="PageBackground" type="TextureRect" parent="." unique_id=1387851649]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
@@ -108,7 +109,8 @@ texture = ExtResource("7_71v1w")
|
|||||||
expand_mode = 1
|
expand_mode = 1
|
||||||
stretch_mode = 5
|
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
|
layout_mode = 0
|
||||||
offset_left = 387.99997
|
offset_left = 387.99997
|
||||||
offset_top = 224.00002
|
offset_top = 224.00002
|
||||||
|
|||||||
@@ -6,9 +6,23 @@ func _ready() -> void:
|
|||||||
manage_pageflip.connect(_on_manage_pageflip)
|
manage_pageflip.connect(_on_manage_pageflip)
|
||||||
|
|
||||||
func _on_manage_pageflip(give_control: bool) -> void:
|
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:
|
for tween in tweens:
|
||||||
if give_control:
|
if give_control:
|
||||||
tween.start_tween()
|
|
||||||
else:
|
|
||||||
tween.stop_tween()
|
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
|
||||||
|
|||||||
@@ -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")]
|
[node name="ContainerTween" parent="." unique_id=160227524 node_paths=PackedStringArray("targets") instance=ExtResource("10_i2rs1")]
|
||||||
unique_name_in_owner = true
|
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")]
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ func _ready() -> void:
|
|||||||
mat.transparency = BaseMaterial3D.TRANSPARENCY_ALPHA
|
mat.transparency = BaseMaterial3D.TRANSPARENCY_ALPHA
|
||||||
|
|
||||||
#fix color
|
#fix color
|
||||||
sub_viewport.use_hdr_2d = false
|
#sub_viewport.use_hdr_2d = false
|
||||||
mat.albedo_texture_force_srgb = true
|
#mat.albedo_texture_force_srgb = true
|
||||||
mat.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED
|
#mat.shading_mode = BaseMaterial3D.SHADING_MODE_UNSHADED
|
||||||
mat.albedo_color = Color(0.85, 0.85, 0.85, 1.0)
|
#mat.albedo_color = Color(0.85, 0.85, 0.85, 1.0)
|
||||||
|
|
||||||
quad_cartello.material_override = mat
|
quad_cartello.material_override = mat
|
||||||
|
|
||||||
|
|||||||
@@ -28,8 +28,10 @@ var _ui_hidden = false
|
|||||||
var _photo_mode_mat_tween: Tween
|
var _photo_mode_mat_tween: Tween
|
||||||
var _photo_mode_alpha_tween: Tween
|
var _photo_mode_alpha_tween: Tween
|
||||||
var _photo_mode_fold_tween: Tween
|
var _photo_mode_fold_tween: Tween
|
||||||
|
var _game_menu_base_scale: Vector2
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
_game_menu_base_scale = game_menu.scale
|
||||||
set_process_input(false)
|
set_process_input(false)
|
||||||
GameState.on_enable_photo_mode_request.connect(_on_enable_photo_mode)
|
GameState.on_enable_photo_mode_request.connect(_on_enable_photo_mode)
|
||||||
GameState.on_disable_photo_mode_request.connect(_on_disable_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()
|
GameState.on_enable_photo_mode_request.emit()
|
||||||
|
|
||||||
func _open_game_menu_on_page(tab_index: int) -> void:
|
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()
|
GameState.pause_game()
|
||||||
game_menu.on_tab_pressed(tab_index, true)
|
game_menu.on_tab_pressed(tab_index, true)
|
||||||
game_menu_panel.show()
|
game_menu_panel.show()
|
||||||
game_menu.scale = Vector2(1, 1)
|
game_menu.scale = _game_menu_base_scale
|
||||||
TweenFX.fold_in(game_menu)
|
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:
|
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)
|
var tween = TweenFX.fold_out(game_menu)
|
||||||
await tween.finished
|
await tween.finished
|
||||||
game_menu_panel.hide()
|
game_menu_panel.hide()
|
||||||
@@ -230,6 +253,13 @@ func _set_buttons_mouse_filter(ignore: bool) -> void:
|
|||||||
for btn in buttons:
|
for btn in buttons:
|
||||||
if btn is Control:
|
if btn is Control:
|
||||||
btn.mouse_filter = filter
|
btn.mouse_filter = filter
|
||||||
|
if ignore:
|
||||||
|
if btn.tooltip_text != "":
|
||||||
|
btn.set_meta("old_tooltip", btn.tooltip_text)
|
||||||
|
btn.tooltip_text = ""
|
||||||
|
else:
|
||||||
|
if btn.has_meta("old_tooltip"):
|
||||||
|
btn.tooltip_text = btn.get_meta("old_tooltip")
|
||||||
|
|
||||||
func hide_ui() -> void:
|
func hide_ui() -> void:
|
||||||
_ui_hidden = true
|
_ui_hidden = true
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -105,6 +105,9 @@
|
|||||||
[ext_resource type="Shader" uid="uid://bhqtjjs3emv7f" path="res://tgcc/main menu/godraysmenu.gdshader" id="103_g1vc5"]
|
[ext_resource type="Shader" uid="uid://bhqtjjs3emv7f" path="res://tgcc/main menu/godraysmenu.gdshader" id="103_g1vc5"]
|
||||||
[ext_resource type="PackedScene" uid="uid://cp2vmysawnuql" path="res://tgcc/chunk/prop/sign/scene/signMenu.tscn" id="103_mrhmq"]
|
[ext_resource type="PackedScene" uid="uid://cp2vmysawnuql" path="res://tgcc/chunk/prop/sign/scene/signMenu.tscn" id="103_mrhmq"]
|
||||||
[ext_resource type="Material" uid="uid://dljvvppsdbjd1" path="res://tgcc/chunk/material/glowplane.tres" id="104_mrhmq"]
|
[ext_resource type="Material" uid="uid://dljvvppsdbjd1" path="res://tgcc/chunk/material/glowplane.tres" id="104_mrhmq"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://kuqxyqwqdrq0" path="res://core/game_menu/assets/page_3/play_button_2.png" id="106_5hxod"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c010wpjb66cmb" path="res://core/game_menu/assets/page_3/settings_button_2.png" id="107_cg70g"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://diqsj3x0ftdo" path="res://core/game_menu/assets/page_3/quit_button_2.png" id="108_0hcuf"]
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_00nq7"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_00nq7"]
|
||||||
render_priority = 0
|
render_priority = 0
|
||||||
@@ -375,14 +378,14 @@ transform = Transform3D(-0.09359112, 0, 0.9713834, 0, 0.56225973, 0, -0.38276488
|
|||||||
[node name="Fuji4" parent="." unique_id=930179001 instance=ExtResource("99_61psf")]
|
[node name="Fuji4" parent="." unique_id=930179001 instance=ExtResource("99_61psf")]
|
||||||
transform = Transform3D(-0.09359112, 0, 0.9713834, 0, 0.56225973, 0, -0.38276488, 0, -0.23751618, 239.46135, 1.7057877, 224.6928)
|
transform = Transform3D(-0.09359112, 0, 0.9713834, 0, 0.56225973, 0, -0.38276488, 0, -0.23751618, 239.46135, 1.7057877, 224.6928)
|
||||||
|
|
||||||
[node name="Landscape" parent="Fuji4" index="0" unique_id=244602034]
|
[node name="Landscape" parent="Fuji4" index="0" unique_id=1897614485]
|
||||||
transform = Transform3D(28.638817, 1.7053026e-13, -7.6293945e-06, 0, 13.6219845, 2.1621709e-06, 0, -1.0284306e-06, 28.638834, -10.786804, 5.0069, 17.382736)
|
transform = Transform3D(28.638817, 1.7053026e-13, -7.6293945e-06, 0, 13.6219845, 2.1621709e-06, 0, -1.0284306e-06, 28.638834, -10.786804, 5.0069, 17.382736)
|
||||||
surface_material_override/0 = SubResource("ShaderMaterial_g1vc5")
|
surface_material_override/0 = SubResource("ShaderMaterial_g1vc5")
|
||||||
|
|
||||||
[node name="Fuji5" parent="." unique_id=1070037082 instance=ExtResource("99_61psf")]
|
[node name="Fuji5" parent="." unique_id=1070037082 instance=ExtResource("99_61psf")]
|
||||||
transform = Transform3D(0.0935979, 0, 0.9713791, 0, 0.56225973, 0, -0.38276324, 0, 0.23753339, -275.95566, -3.4616928, 232.02234)
|
transform = Transform3D(0.0935979, 0, 0.9713791, 0, 0.56225973, 0, -0.38276324, 0, 0.23753339, -275.95566, -3.4616928, 232.02234)
|
||||||
|
|
||||||
[node name="Landscape" parent="Fuji5" index="0" unique_id=244602034]
|
[node name="Landscape" parent="Fuji5" index="0" unique_id=1897614485]
|
||||||
transform = Transform3D(28.638819, 1.7053026e-13, -7.6293945e-06, 0, 13.6219845, 2.1621709e-06, 0, -1.0284306e-06, 28.638836, -10.786743, 6.703195, 17.382767)
|
transform = Transform3D(28.638819, 1.7053026e-13, -7.6293945e-06, 0, 13.6219845, 2.1621709e-06, 0, -1.0284306e-06, 28.638836, -10.786743, 6.703195, 17.382767)
|
||||||
surface_material_override/0 = SubResource("ShaderMaterial_g1vc5")
|
surface_material_override/0 = SubResource("ShaderMaterial_g1vc5")
|
||||||
|
|
||||||
@@ -392,7 +395,7 @@ transform = Transform3D(-4.88843, -0.020050459, 0.86837775, -0.010355438, 4.9646
|
|||||||
[node name="Fuji6" parent="." unique_id=150126281 instance=ExtResource("100_0aqpp")]
|
[node name="Fuji6" parent="." unique_id=150126281 instance=ExtResource("100_0aqpp")]
|
||||||
transform = Transform3D(-5.287449, -0.020231497, 0.22351237, -0.011200703, 5.009496, 0.014500697, -0.9394429, 0.05414178, -1.2581636, 32.446022, 15.848213, 525.54346)
|
transform = Transform3D(-5.287449, -0.020231497, 0.22351237, -0.011200703, 5.009496, 0.014500697, -0.9394429, 0.05414178, -1.2581636, 32.446022, 15.848213, 525.54346)
|
||||||
|
|
||||||
[node name="Mt Fuji_simplified_3d_mesh" parent="Fuji6" index="0" unique_id=1389340781]
|
[node name="Mt Fuji_simplified_3d_mesh" parent="Fuji6" index="0" unique_id=206531083]
|
||||||
transform = Transform3D(0.5151193, -0.011206273, -0.07264297, 0.077138014, 0.07483422, 0.48510167, 3.5762787e-07, -0.4938935, 0.07515043, 6.299696, 12.244916, 3.004303)
|
transform = Transform3D(0.5151193, -0.011206273, -0.07264297, 0.077138014, 0.07483422, 0.48510167, 3.5762787e-07, -0.4938935, 0.07515043, 6.299696, 12.244916, 3.004303)
|
||||||
surface_material_override/0 = SubResource("ShaderMaterial_vvb5q")
|
surface_material_override/0 = SubResource("ShaderMaterial_vvb5q")
|
||||||
|
|
||||||
@@ -495,12 +498,21 @@ offset_top = 6.0
|
|||||||
offset_bottom = -6.0
|
offset_bottom = -6.0
|
||||||
theme_override_constants/separation = 64
|
theme_override_constants/separation = 64
|
||||||
|
|
||||||
|
[node name="PlayButton" parent="MainMenuUI/SubViewport/OptionMenu/VBoxContainer" index="0" unique_id=1990327704]
|
||||||
|
image = ExtResource("106_5hxod")
|
||||||
|
|
||||||
[node name="ResumeButton" parent="MainMenuUI/SubViewport/OptionMenu/VBoxContainer" index="1" unique_id=635721927]
|
[node name="ResumeButton" parent="MainMenuUI/SubViewport/OptionMenu/VBoxContainer" index="1" unique_id=635721927]
|
||||||
visible = false
|
visible = false
|
||||||
|
|
||||||
|
[node name="SettingsButton" parent="MainMenuUI/SubViewport/OptionMenu/VBoxContainer" index="2" unique_id=1931222561]
|
||||||
|
image = ExtResource("107_cg70g")
|
||||||
|
|
||||||
[node name="SaveButton" parent="MainMenuUI/SubViewport/OptionMenu/VBoxContainer" index="3" unique_id=1161034414]
|
[node name="SaveButton" parent="MainMenuUI/SubViewport/OptionMenu/VBoxContainer" index="3" unique_id=1161034414]
|
||||||
visible = false
|
visible = false
|
||||||
|
|
||||||
|
[node name="QuitButton" parent="MainMenuUI/SubViewport/OptionMenu/VBoxContainer" index="4" unique_id=1804807896]
|
||||||
|
image = ExtResource("108_0hcuf")
|
||||||
|
|
||||||
[connection signal="input_event" from="Sign/QuadSign/Area3D" to="Sign" method="_on_area_3d_input_event"]
|
[connection signal="input_event" from="Sign/QuadSign/Area3D" to="Sign" method="_on_area_3d_input_event"]
|
||||||
|
|
||||||
[editable path="Fuji4"]
|
[editable path="Fuji4"]
|
||||||
|
|||||||
Reference in New Issue
Block a user