Home › Concepts › The UI system

The UI system

AFS_UI is a design system rather than a widget grab-bag.

Theme. BP_PDA_Theme is a data asset holding fonts, corner radii, outline widths and six colour ramps keyed by an intensity enum. BPC_GameState_ThemeManager holds the available themes and fires OnThemeUpdated when the active one changes, so a live theme swap propagates without rebuilding widgets.

Lifecycle. Every widget implements BPI_WidgetElement, whose functions separate concerns deliberately:

Keeping theme code out of the content path is what makes runtime theme switching cheap.

Layers. Primitives (AFBorder, AFImage, AFText, AFScrollbox, AFSwitcher, throbbers) sit at the bottom. Composed controls (buttons, sliders, steppers, dropdowns, text fields, colour picker, chip selector) build on those. Layout scaffolds, boxes and groups arrange them. Feature plugins — menu, notifications, popups, labels, info panels — sit on top and each expose a one-call Blueprint library so the surface a project actually touches stays small.

Spatial UI is split by anchor. AFS_UISpace_Pawn positions body-locked widgets using PDA_PawnUIPosition data assets with element pooling; AFS_UISpace_Hand spawns a wrist panel that appears when the palm turns toward the face within a configurable angle. AFS_UI_Menu ships the same menu twice, WBP_Menu_VR and WBP_Menu_Desktop, over shared page data assets.

BPI_WidgetElement call order
diagram_widget_lifecycle.svgBPI_WidgetElement call order
BPI_WidgetElement call order
How a theme change reaches every widget
diagram_theme_propagation.svgHow a theme change reaches every widget
How a theme change reaches every widget
The same screen under two themes
AFS_UI_theme_compare.pngThe same screen under two themes
The same screen under two themes