Reference · Updated 2552.07.26.14.59

Codex Handoff — UMG Widget-Tree Authoring (Phase 0b menus)

Purpose. This is a self-contained task spec for an agent with computer-use (mouse/keyboard control) to build UMG widget trees in the already-open Unreal Editor 5.7 for the SystemLi

Purpose. This is a self-contained task spec for an agent with computer-use (mouse/keyboard control)
to build UMG widget trees in the already-open Unreal Editor 5.7 for the SystemLink project. These trees
can't be built by the Python scripting bridge (WidgetTree is engine-protected), which is why they're
delegated here. Everything else (C++, data assets, styles, CDO properties) is already done via the bridge.
You are the hands in the editor. All asset paths, widget names, and property values below are exact —
use them verbatim. Names are case-sensitive and must match precisely (a mismatched BindWidget name
silently binds to null with no warning).

#Context you need

  • App: Unreal Editor 5.7, project SystemLink — already open. Do not open a different project.
  • Editor layout of a UMG (Widget Blueprint) editor: left = Palette (widget types to drag) + Hierarchy
  • (the tree); center = Designer canvas; right = Details. Top bar has Compile and Save. There's a Graph / Designer toggle (top-right) for the event-graph view.

  • To add a widget: drag it from the Palette onto the target parent in the Hierarchy (dropping onto a
  • panel makes it a child). To rename: double-click the widget in the Hierarchy and type the new name.

  • To find a widget type in the Palette: use the Palette search box; type the class name.

#Guardrails

  • Only touch the four assets named below. Do not modify any other asset, or any C++.
  • After each asset: click Compile, then Save. If Compile shows an error you can't resolve, stop and
  • report what you see — don't guess-fix.

  • If an asset already has some of these widgets, reconcile to the target state rather than duplicating.
  • You do not set PauseMenuClass — that's done separately via the bridge. Skip anything not listed here.

#Task A — WBP_SL_Button (do this FIRST; the menus place instances of it)

Path: /Game/SystemLink/UI/Menus/WBP_SL_Button — parent class USLButtonBase. It already has Style set; its tree is currently empty. Goal: give it a label text block so buttons show their caption.

  1. Content Browser → navigate to /Game/SystemLink/UI/Menus/double-click WBP_SL_Button.
  1. In the Palette, search CommonTextBlock. Drag one into the Hierarchy so it becomes the root
  2. (drop it on [WBP_SL_Button] root node). If a default root panel (e.g. CanvasPanel) exists, you may drop the CommonTextBlock inside it — either is fine.

  1. Rename that CommonTextBlock to exactly ButtonText (case-sensitive — the C++ binds ButtonText).
  1. Select ButtonText → in Details, set Horizontal Alignment = Center and **Vertical Alignment =
  2. Center** (and if it's under a Canvas, set anchors to center or use a SizeBox — the goal is the text sits centered in the button).

  1. Compile → Save.
Note: you do not type caption text here. Each placed instance of WBP_SL_Button gets its caption from a
property called ButtonDisplayText (see Task C/D). NativePreConstruct copies ButtonDisplayText into
ButtonText automatically.

#Task B — WBP_SL_BoundActionButton (the action-bar prompt entry)

Path: /Game/SystemLink/UI/Menus/WBP_SL_BoundActionButton — parent class CommonBoundActionButton. Empty tree.

  1. Double-click it to open.
  1. Palette → CommonTextBlock → drag into the Hierarchy (root or inside a root panel).
  1. Rename it to exactly Text_ActionName (case-sensitive — required BindWidget on the engine base class;
  2. the button won't compile-bind its prompt label without this exact name).

  1. Compile → Save.

#Task C — WBP_SL_PauseMenu

Path: /Game/SystemLink/UI/Menus/WBP_SL_PauseMenu — parent class USLScreenWidget. Empty tree.

Build the hierarchy:

  1. Open it. Palette → Vertical Box → drag onto the root so the tree root is a VerticalBox.
  2. (Rule: navigation panels are VerticalBox, never CanvasPanel.)

  1. Palette → search WBP_SL_Button (your own widget from Task A appears under User Created). Drag three
  2. into the VerticalBox. Rename them (double-click in Hierarchy):

    • Btn_Resume
    • Btn_Settings
    • Btn_LeaveMatch
3. For each of the three, select it → in Details, find the **SystemLinkUI** category → set

Button Display Text:

  • Btn_ResumeResume
    • Btn_SettingsSettings
    • Btn_LeaveMatchLeave Match
  1. Palette → search CommonBoundActionBar → drag one into the VerticalBox below the three buttons.
  2. Rename it ActionBar. Select it → in Details, set its Action Button class to WBP_SL_BoundActionButton.

Class Defaults (screen behavior):

  1. Click Class Defaults (button in the top toolbar of the editor, or the "Class Defaults" node). In Details,
under **SystemLinkUI**:
  • Set Pause Game While Active = checked (true).
    • Leave Auto Focus Widget BLANK — do NOT use its dropdown (it silently reverts + can crash the editor).
    • Initial focus is set via a graph override instead (next step). (Leave InputMode/back-handler alone — inherited from USLScreenWidget.)

Initial controller focus (graph override — do NOT use the Auto Focus Widget picker): 5b. Switch to the Graph tab. In the My Blueprint panel → FunctionsOverride dropdown → pick Get Desired Focus Target. In that function, drag in the Btn_Resume variable and wire it into the function's Return Value, then Compile. (This persists where the CDO picker does not.)

Resume wiring (event graph):

  1. Select Btn_Resume in the Hierarchy. In Details, scroll to Events and click the + next to
  2. On Clicked ( ) — this creates/opens the OnClicked (Btn_Resume) event node in the Graph.

  1. From that event's exec pin, build: Get Owning Player ControllerCast to SLPlayerController
  2. call Close Pause Menu (on the cast result). Wire exec straight through.

    • (Get Owning Player Controller → drag off its return → "Cast to SLPlayerController" → drag off "As SL Player
    • Controller" → "Close Pause Menu".)

  1. Leave Btn_Settings / Btn_LeaveMatch unwired (stubs for now).
  1. Compile → Save.

#Task D — WBP_SL_TestScreen

Path: /Game/SystemLink/UI/Menus/WBP_SL_TestScreen — parent class USLScreenWidget. Empty tree. Same shape, simpler:

  1. Root = Vertical Box.
  1. Two WBP_SL_Button inside it: Btn_One, Btn_Two. Set their Button Display Text to Button One /
  2. Button Two.

  1. A CommonBoundActionBar named ActionBar below them; Action Button class = WBP_SL_BoundActionButton.
4. **Class Defaults → SystemLinkUI: leave Pause Game While Active unchecked (false)** and

Auto Focus Widget blank.

  1. Graph → override Get Desired Focus Target → return the Btn_One variable (same as Task C step 5b).
  2. Do NOT use the Auto Focus Widget picker.

  1. Compile → Save.

#Acceptance (how you know you're done)

  • All four assets compile with no errors and are saved (no * asterisk on the tab).
  • WBP_SL_Button has a CommonTextBlock named exactly ButtonText.
  • WBP_SL_BoundActionButton has a CommonTextBlock named exactly Text_ActionName.
  • WBP_SL_PauseMenu: VerticalBox → Btn_Resume / Btn_Settings / Btn_LeaveMatch (with display text) +
  • ActionBar; Class Defaults Pause Game While Active = true (Auto Focus Widget blank); a Get Desired Focus Target graph override returning Btn_Resume; Btn_Resume OnClicked calls Close Pause Menu on the cast SLPlayerController.

  • WBP_SL_TestScreen: VerticalBox → Btn_One / Btn_Two + ActionBar; Pause Game While Active = false
  • (Auto Focus Widget blank); a Get Desired Focus Target graph override returning Btn_One.

Report back: for each asset, whether it compiled+saved cleanly, and paste any warnings/errors you saw. Do not run the game (PIE) — that gate test is handled separately.