๐Ÿ›๏ธ 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_DA to apply.
  • bImmediate: If true, bypasses outro/intro animations and swaps instantly.

SetCurrentTheme

Applies a new visual theme to all registered widgets.

  • NewTheme: The UGorgeousUITheme_DA containing 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 the UObject* instance (usually this).

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).