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
|
|
@ -26,8 +26,7 @@ var appearance_snapshot: Dictionary = (
|
|||
func apply_appearance_snapshot(snapshot: Dictionary) -> void:
|
||||
if CharacterCustomizationCatalog.validate_snapshot(snapshot):
|
||||
appearance_snapshot = snapshot.duplicate(true)
|
||||
# Current gameplay art is monolithic. This seam intentionally stores the
|
||||
# validated state until modular visual parts are available.
|
||||
PlayerVisualPresenter.apply_appearance(_visuals, appearance_snapshot)
|
||||
|
||||
class ShowcaseCameraSnapshot:
|
||||
extends RefCounted
|
||||
|
|
@ -495,6 +494,10 @@ func set_camera_input_enabled(enabled: bool) -> void:
|
|||
_camera_dragging = false
|
||||
|
||||
|
||||
func set_camera_active(active: bool) -> void:
|
||||
_camera.current = active
|
||||
|
||||
|
||||
func apply_camera_settings(
|
||||
new_mouse_sensitivity: float,
|
||||
new_controller_sensitivity: float,
|
||||
|
|
|
|||
28
player/player_visual_presenter.gd
Normal file
28
player/player_visual_presenter.gd
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
class_name PlayerVisualPresenter
|
||||
extends RefCounted
|
||||
|
||||
const PlayerScene: PackedScene = preload("res://player/player.tscn")
|
||||
|
||||
|
||||
static func instantiate_visuals() -> Node3D:
|
||||
var source: Player = PlayerScene.instantiate()
|
||||
var visuals := source.get_node("Visuals") as Node3D
|
||||
var presentation := visuals.duplicate(
|
||||
Node.DUPLICATE_SIGNALS
|
||||
| Node.DUPLICATE_GROUPS
|
||||
| Node.DUPLICATE_SCRIPTS
|
||||
| Node.DUPLICATE_USE_INSTANTIATION
|
||||
) as Node3D
|
||||
source.free()
|
||||
presentation.name = "PlayerVisuals"
|
||||
return presentation
|
||||
|
||||
|
||||
static func apply_appearance(
|
||||
_visuals: Node3D,
|
||||
snapshot: Dictionary,
|
||||
) -> void:
|
||||
# Gameplay and preview deliberately share this presentation seam. Modular
|
||||
# visual parts can be applied here without coupling Profile to Player.
|
||||
if not CharacterCustomizationCatalog.validate_snapshot(snapshot):
|
||||
return
|
||||
1
player/player_visual_presenter.gd.uid
Normal file
1
player/player_visual_presenter.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://b4w23asm85rtu
|
||||
Loading…
Add table
Add a link
Reference in a new issue