๐๏ธ Subsystem & Interfaces
Short Description
A detailed API reference for the core managers and interfaces that power the CommonUI Foundation.
Long Description
The UGorgeousUIFoundationSubsystem acts as the traffic controller for the entire UI system. It bridges the gap between high-level game logic (Signal Bridge, Input) and low-level widget rendering. By using the IGorgeousUIWidget_I interface, it treats every UI element as a standardized component, regardless of whether it's a simple text block or a complex inventory screen.
๐ก UGorgeousUIFoundationSubsystem
The subsystem is a Local Player Subsystem, meaning each player has their own independent UI manager.
Key Methods
SwitchUIState
Switches the global UI state (e.g., from Exploration to Inventory).
- NewState: The
UGorgeousUIState_DAto apply. - bImmediate: If true, bypasses outro/intro animations and swaps instantly.
SetCurrentTheme
Applies a new visual theme to all registered widgets.
- NewTheme: The
UGorgeousUITheme_DAcontaining colors, fonts, and icons. - Note: This triggers a recursive theme update across the entire UI tree.
RegisterWidget / UnregisterWidget
Manages the lifecycle of UI elements. Widgets should call these in NativeConstruct and NativeDestruct.
SetActiveInputBindings
Swaps the current tag-to-action input mapping. This is usually handled automatically by the UI State, but can be overridden manually for special sequences.
๐ IGorgeousUIWidget_I
The "Universal Connector" for the UI system. Any class implementing this interface gains access to theming, states, and signals.
Required Implementations
GetBindingTag(): Returns the Gameplay Tag this widget is "bound" to (e.g.,UI.Element.Health).GetAsWidget(): Returns theUObject*instance (usuallythis).
Key Callbacks
OnThemeApplied(): Called whenever the global theme changes.NotifyReadyForStateSwap(): Called by the widget when it has finished its outro animation to signal the subsystem.ApplyOverlayConfig(): Called during state transitions to apply layout-specific settings (Visibility, Opacity, Input Mode).
๐ฆ Data Assets
The behavior of the subsystem is driven by three primary data assets.
๐ UI State (UGorgeousUIState_DA)
Defines the "Mode" the game is in.
- State Tag: The unique identifier for the state.
- Input Contexts: Enhanced Input Mapping Contexts to push.
- Overlay Config: Default visibility/input settings for widgets in this state.
๐จ UI Theme (UGorgeousUITheme_DA)
The "Skin" of the application.
- Style Properties: A map of names to Instanced Structs (Colors, Brushes, Fonts).
- Action Icons: Platform-specific icon maps (Xbox, PS5, KBM).
- Sound Map: Themed audio cues for UI interactions.
โจ๏ธ Input Binding (UGorgeousInputBinding_DA)
The bridge between physical inputs and logical UI actions.
- Bindings: Maps
UInputAction*assets to Gameplay Tags (e.g.,IA_Confirm->UI.Action.Confirm).
๐ Related Documents
- Technical Deep-Dive โ Architecture and registration flow.
- UI Processors โ How property mapping and logic decoupling works.