Diagrams
1. Widget Data Flow (consume pattern)
How data flows from the caller to the widget through FCWidgetOStruct and WidgetUtility::sendData.
sequenceDiagram
participant C as Caller
participant CU as CoordinatorUtility
participant S as spawnWidgetAtRuntime
participant WU as WidgetUtility
participant W as Widget
C ->> CU: retrieveWidget(ECWidget)
CU -->> C: TSubclassOf<UUserWidget>
C ->> S: spawnWidgetAtRuntime(source, class, lambda)
S -->> C: widget instance
C ->> WU: sendData(source, widget, mapBuilder)
WU ->> W: ICWidgetOExchange::Execute_consume(map)
W ->> W: consume_Implementation(map)
W ->> W: map.Find(getWOEName())
W ->> W: Extract FCWidgetOStruct fields
W ->> W: Bind UI elements2. Class Architecture
Widget class hierarchy showing the base class in CCOREUMODULE and implementations in CWIDGETUMODULE.
flowchart TB
subgraph CCOREUMODULE["CCOREUMODULE (interfaces)"]
UUW["UUserWidget (UE)"]
ICWOE["ICWidgetOExchange\nconsume(map)"]
ICWSH["ICWidgetShowHide\nswitchShowHide()"]
ICWW["ICWidgetWorld\nworldData()"]
FCWOS["FCWidgetOStruct\nobject, floatArray, intArray\naName, aText, event..."]
FCWWD["FCWorldWidgetData\ndrawSize, transform\nworldMaterial"]
ECW["ECWidget enum\nW_LIFE, W_DIALOG\nW_SKILL, W_COMPASS..."]
end
subgraph CWIDGETUMODULE["CWIDGETUMODULE (implementations)"]
UCU["UCUserWidget\n(base class)"]
WLife["UCLifeWidget ā
"]
WDebug["UCDebugWidget ā
"]
WDialog["UCDialogWidget"]
WInteract["UCInteractionWidget"]
WSkill["UCSkillDockWidget"]
WResource["UCResourceWidget"]
WCompass["UCCompassWidget"]
WMinimap["UCMinimapWidget"]
WTextPop["UCTextPopWidget"]
WMobile["UCMobileWidget"]
WPortrait["UCPortraitWidget"]
end
UUW --> UCU
ICWOE --> UCU
ICWSH --> UCU
UCU --> WLife
UCU --> WDebug
UCU --> WDialog
UCU --> WInteract
UCU --> WSkill
UCU --> WResource
UCU --> WCompass
UCU --> WMinimap
UCU --> WTextPop
UCU --> WMobile
UCU --> WPortrait
ICWW -.-> WLife
ICWW -.-> WDebug
style CCOREUMODULE fill:#1a1a2a,stroke:#4444aa
style CWIDGETUMODULE fill:#1a2a1a,stroke:#44aa44ā = implements ICWidgetWorld (world-space projection)
3. Widget Spawn and Registration Pipeline
How a widget is instantiated from the ECWidget enum to the final consume call.
flowchart TD
A["ECWidget::W_xxx"] --> B["CoordinatorUtility\n::retrieveWidget(ECWidget)"]
B --> C["TSubclassOf<UUserWidget>\n(Blueprint class from\nCoordinator singleton)"]
C --> D["spawnWidgetAtRuntime<T>\n(source, class, lambda)"]
D --> E["Widget instance created"]
E --> F["lambda(widget) called"]
F --> G["WidgetUtility::sendData\n(source, widget, mapBuilder)"]
G --> H["ICWidgetOExchange\n::Execute_consume(widget, map)"]
H --> I["Widget::consume_Implementation"]
I --> J["map.Find(getWOEName())"]
J --> K["Extract FCWidgetOStruct"]
K --> L["Bind UI + autoRemoveWith"]
style A fill:#2a2a4a,stroke:#6666cc
style L fill:#1a3a1a,stroke:#44aa444. World-Space vs Screen-Space Widgets
The two rendering modes used by widgets in the module.
flowchart TB
subgraph WORLD["WORLD-SPACE (ICWidgetWorld)"]
WL["UCLifeWidget\nhealth bar below capsule"]
WD["UCDebugWidget\ntext above capsule"]
WWD["worldData_Implementation()\nā FCWorldWidgetData"]
MAT["MAT_CdryxWorldProjection\n(render-to-texture in 3D)"]
WL --> WWD
WD --> WWD
WWD --> MAT
end
subgraph SCREEN["SCREEN-SPACE (HUD)"]
WSkill["UCSkillDockWidget"]
WRes["UCResourceWidget"]
WDlg["UCDialogWidget"]
WMob["UCMobileWidget"]
WPort["UCPortraitWidget"]
WMini["UCMinimapWidget"]
VP["AddToViewport()\nstandard UMG rendering"]
WSkill --> VP
WRes --> VP
WDlg --> VP
WMob --> VP
WPort --> VP
WMini --> VP
end
subgraph HYBRID["HYBRID (screen + world tracking)"]
WInt["UCInteractionWidget\nbutton follows actor\nvia ProjectWorldLocation"]
WTxt["UCTextPopWidget\nanimated text follows actor\nvia ProjectWorldLocation"]
WCmp["UCCompassWidget\nmarks positioned by angle"]
end
style WORLD fill:#1a3a1a,stroke:#3a7a3a
style SCREEN fill:#1a1a3a,stroke:#3a3a7a
style HYBRID fill:#3a3a1a,stroke:#7a7a3a5. Composite Widget Hierarchy
Widgets that spawn child widgets dynamically.
flowchart TD
subgraph DIALOG["UCDialogWidget"]
D_RT["dialog_RichTextBlock\n(rich text content)"]
D_DOCK["dock_PanelWidget"]
D_CLOSE["close_Button\nā closeDialog()"]
D_BTN["UCDialogButtonWidget (x N)\ndialog_Button + dialog_RichTextBlock\nclickIt ā widgetEvent ā closeDialog"]
D_DOCK --> D_BTN
end
subgraph SKILL["UCSkillDockWidget"]
S_DOCK["dock_PanelWidget\nonSkillListChange rebuilds"]
S_BTN["UCSkillDockButtonWidget (x N)\nskill_Button (icon from metadata)\ncooldown_Border overlay\nredCross_Image flash\npop_Image animation"]
S_TIP["UCSkillTooltipDockButtonWidget\nicon + label + cooldown\n(hover tooltip)"]
S_DOCK --> S_BTN
S_BTN -.-> S_TIP
end
subgraph RESOURCE["UCResourceWidget"]
R_GRID["UniformGridPanel\nnumberOfColumn=3"]
R_CLOSE2["close_Button"]
R_ITEM["UCResourceItemWidget (x N)\nImage (icon) + count_RichTextBlock"]
R_TIP["UCResourceTooltipWidget\nlabel from metadata\n(hover tooltip)"]
R_GRID --> R_ITEM
R_ITEM -.-> R_TIP
end
subgraph COMPASS["UCCompassWidget"]
C_PANEL["PanelWidget\nmarkMap by index"]
C_MARK["UCCompassMarkWidget (x N)\nImage + type_RichTextBlock\ndistance_RichTextBlock\nscale by curve, alpha by distance"]
C_PANEL --> C_MARK
end
style DIALOG fill:#1a1a2a,stroke:#5555aa
style SKILL fill:#2a1a1a,stroke:#aa5555
style RESOURCE fill:#1a2a1a,stroke:#55aa55
style COMPASS fill:#2a2a1a,stroke:#aaaa55