feat(mvp): complete M13 clean-up milestone (real usernames, avatar studio redesign, pause menu, audio manager)
checkpoint / checkpoint (push) Successful in 6m22s
checkpoint / checkpoint (push) Successful in 6m22s
This commit is contained in:
@@ -2,8 +2,9 @@ extends Control
|
||||
## Full-screen host for the AvatarCustomizationUI.
|
||||
##
|
||||
## The UI itself (scripts/avatar/avatar_customization_ui.gd) builds its own
|
||||
## layout programmatically and emits `closed` when the player backs out; this
|
||||
## thin wrapper is what makes it a navigable scene reachable from the main menu.
|
||||
## layout programmatically, auto-saves on exit, and emits `closed` / `back_requested`
|
||||
## when the player backs out. This thin wrapper hosts it as a navigable scene
|
||||
## reachable from the main menu and handles ESC / back transitions.
|
||||
|
||||
const AvatarCustomizationUI := preload("res://scripts/avatar/avatar_customization_ui.gd")
|
||||
|
||||
@@ -18,3 +19,13 @@ func _ready() -> void:
|
||||
|
||||
func _on_closed() -> void:
|
||||
get_tree().change_scene_to_file("res://scenes/main_menu.tscn")
|
||||
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("ui_cancel"):
|
||||
get_viewport().set_input_as_handled()
|
||||
var ui = get_node_or_null("AvatarCustomizationUI")
|
||||
if ui != null and ui.has_method("save_and_exit"):
|
||||
ui.save_and_exit()
|
||||
else:
|
||||
_on_closed()
|
||||
|
||||
Reference in New Issue
Block a user