How-To: HUD Layout & Escape Menu

Goal: give the always-present HUD root an Escape/Pause binding that opens your pause menu, and (for console) a controller-disconnect screen.

Prerequisites
Quick Start step 9 done - a UCrimsonHUDLayout subclass pushed to UI.Layer.Game. A pause-menu widget (any UCommonActivatableWidget subclass, e.g. a UCrimsonActivatableWidget with InputConfig = Menu).

1. Set the escape menu class

On BP_HUDLayout's Class Defaults set EscapeMenuClass to your pause menu. When the escape action fires, UCrimsonHUDLayout pushes it onto UI.Layer.Menu (streamed, so a soft reference is fine).

BP_HUDLayout Class Defaults: Escape Menu Class = WBP_PauseMenu, Escape Input Action = IA_UI_Escape (optional), Controller Disconnected Screen Class + Platform Requires Controller Disconnect Screen (console only).

2. Choose the escape binding mode

ModeWhenHow to configure
Enhanced Input (recommended, 5.8+)EscapeInputAction is setAssign your Escape/Pause UInputAction. Requires bEnableEnhancedInputSupport=True (Quick Start step 4) so CommonUI resolves the bound key - glyphs then auto-update on rebind.
Tag-based (legacy fallback)EscapeInputAction is nullThe layout binds the UI.Action.Escape UI action tag. Your UCommonUIInputData DataTable must contain a row keyed to UI.Action.Escape mapping it to a key.
Escape works during gameplay
Both binding paths register with InputMode = Game, so the escape key fires while you are playing (not only while a menu is focused). UI.Action.Escape is the only action tag CrimsonUI reserves.
Verify
PIE: pressing the bound key pushes the pause menu onto UI.Layer.Menu; its InputConfig = Menu shows the cursor. Pressing CommonUI's Back action (or clicking a close button that calls Deactivate Widget) returns to the game.

3. (Console) controller-disconnect screen

On platforms whose trait set contains every tag in PlatformRequiresControllerDisconnectScreen (default: Platform.Trait.Input.PrimarilyController), the HUD layout listens for input-device connection/pairing changes and shows ControllerDisconnectedScreenClass when the player has no paired controller.

PropertyTypeNotes
ControllerDisconnectedScreenClassTSubclassOf<UCrimsonControllerDisconnectedScreen>Your reconnect prompt. The base class shows a 'Change User' button on platforms whose traits match its PlatformSupportsUserChangeTags.
PlatformRequiresControllerDisconnectScreenFGameplayTagContainerAll tags must be in the platform's trait set for the screen to be used. Desktop platforms without the trait never show it.
Override hooks
DisplayControllerDisconnectedMenu and HideControllerDisconnectedMenu are BlueprintNativeEvents on the HUD layout - override them in BP_HUDLayout for custom animation or audio around the screen.

See also

  • How-To: UI Extension Points - carve named slots into the HUD layout for GameFeature widgets.
  • How-To: Tag-Driven HUD Visibility - hide HUD elements by gameplay tag.
  • Concept: Input Routing & Activatable Widgets - why the HUD layout uses InputConfig = Game.