Unify menu presentation and fix UI regressions
This commit is contained in:
parent
3734d4a168
commit
b18d9392d8
35 changed files with 588 additions and 361 deletions
16
main/main.gd
16
main/main.gd
|
|
@ -132,6 +132,7 @@ const TITLE_MUSIC_SILENCE_DB: float = -80.0
|
|||
%NetworkProfileService
|
||||
)
|
||||
@onready var _players_root: Node3D = $Players
|
||||
@onready var _title_background: ColorRect = %TitleBackground
|
||||
|
||||
var _gameplay_started: bool = false
|
||||
var _shop_interaction: FishingShopInteractionType
|
||||
|
|
@ -154,6 +155,7 @@ var _pending_existing_root_path := ""
|
|||
|
||||
|
||||
func _ready() -> void:
|
||||
DisplayServer.window_set_title("NETfishing")
|
||||
if not _settings_manager.settings_changed.is_connected(
|
||||
_apply_runtime_settings
|
||||
):
|
||||
|
|
@ -486,7 +488,7 @@ func _initialize_after_data_root() -> void:
|
|||
func _show_data_root_setup() -> void:
|
||||
if _data_setup_dialog == null:
|
||||
_data_setup_dialog = ConfirmationDialog.new()
|
||||
_data_setup_dialog.title = "NETFISHING player data"
|
||||
_data_setup_dialog.title = "NETfishing player data"
|
||||
_data_setup_dialog.ok_button_text = "Use This Folder"
|
||||
_data_setup_dialog.cancel_button_text = "Quit"
|
||||
_data_setup_dialog.confirmed.connect(_use_default_data_root)
|
||||
|
|
@ -503,8 +505,8 @@ func _show_data_root_setup() -> void:
|
|||
var default_path: String = _data_root.default_visible_path()
|
||||
var legacy: bool = PortableDataMigration.legacy_files_present()
|
||||
_data_setup_dialog.dialog_text = (
|
||||
("Move your existing NETFISHING data to an easy-to-find folder."
|
||||
if legacy else "Choose where NETFISHING stores your player data.")
|
||||
("Move your existing NETfishing data to an easy-to-find folder."
|
||||
if legacy else "Choose where NETfishing stores your player data.")
|
||||
+ "\n\n%s\n\nYou can choose a Syncthing folder."
|
||||
% (default_path if not default_path.is_empty() else "Choose a folder")
|
||||
)
|
||||
|
|
@ -513,7 +515,7 @@ func _show_data_root_setup() -> void:
|
|||
)
|
||||
if not _data_root.error_message.is_empty():
|
||||
_data_setup_dialog.dialog_text = (
|
||||
"Your NETFISHING data folder is unavailable.\n\n%s"
|
||||
"Your NETfishing data folder is unavailable.\n\n%s"
|
||||
% _data_root.error_message
|
||||
)
|
||||
_data_setup_dialog.popup_centered(Vector2i(640, 360))
|
||||
|
|
@ -621,11 +623,11 @@ func _activate_selected_data_path(path: String, app_data: bool = false) -> void:
|
|||
func _show_existing_root_choice(path: String) -> void:
|
||||
_pending_existing_root_path = path
|
||||
var dialog: ConfirmationDialog = ConfirmationDialog.new()
|
||||
dialog.title = "Existing NETFISHING data"
|
||||
dialog.title = "Existing NETfishing data"
|
||||
dialog.ok_button_text = "Use Data Already in Selected Folder"
|
||||
dialog.cancel_button_text = "Cancel"
|
||||
dialog.dialog_text = (
|
||||
"This folder already contains NETFISHING player data.\n\n"
|
||||
"This folder already contains NETfishing player data.\n\n"
|
||||
+ "Choose which complete data set to use. Data is never merged automatically."
|
||||
)
|
||||
dialog.add_button(
|
||||
|
|
@ -869,12 +871,14 @@ func _reset_pixelation() -> void:
|
|||
|
||||
func _set_gameplay_active(active: bool) -> void:
|
||||
_gameplay_started = active
|
||||
_title_background.visible = not active
|
||||
_world_pixelation.set_gameplay_active(active)
|
||||
_ui_pixelation.set_gameplay_active(active)
|
||||
if not active:
|
||||
_player.item_effects.reset_all()
|
||||
_player.set_movement_enabled(active)
|
||||
_player.set_camera_input_enabled(active)
|
||||
_player.set_camera_active(active)
|
||||
_fishing_spot.set_gameplay_input_enabled(active)
|
||||
_water_recovery.set_recovery_enabled(active)
|
||||
_game_ui.set_gameplay_ui_enabled(active)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=40 format=3]
|
||||
[gd_scene load_steps=42 format=3]
|
||||
|
||||
[ext_resource type="PackedScene" path="res://world/test_world.tscn" id="1_world"]
|
||||
[ext_resource type="PackedScene" path="res://player/player.tscn" id="2_player"]
|
||||
|
|
@ -39,6 +39,10 @@
|
|||
[ext_resource type="Script" path="res://network/player_data_root.gd" id="37_data_root"]
|
||||
[ext_resource type="Script" path="res://network/identity_backup_service.gd" id="38_identity_backup"]
|
||||
[ext_resource type="Script" path="res://ui/interface_font_controller.gd" id="39_fonts"]
|
||||
[ext_resource type="Shader" path="res://ui/title_water_background.gdshader" id="40_title_water"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_title_water_native"]
|
||||
shader = ExtResource("40_title_water")
|
||||
|
||||
[node name="Main" type="Node3D"]
|
||||
script = ExtResource("3_main")
|
||||
|
|
@ -47,6 +51,20 @@ pelican_buyer_profile = ExtResource("7_pelicans")
|
|||
main_shop_buyer_profile = ExtResource("12_main_shop")
|
||||
item_catalog = ExtResource("11_items")
|
||||
|
||||
[node name="TitleBackgroundLayer" type="CanvasLayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
layer = -1
|
||||
|
||||
[node name="TitleBackground" type="ColorRect" parent="TitleBackgroundLayer"]
|
||||
unique_name_in_owner = true
|
||||
material = SubResource("ShaderMaterial_title_water_native")
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="InterfaceFontController" type="Node" parent="."]
|
||||
unique_name_in_owner = true
|
||||
script = ExtResource("39_fonts")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue