API ReferenceGE Extensionsflowgraphnodesui
Custom UI Layout (Flowgraph Node)
- **Node Name:** `Custom UI Layout`
Overview
- Node Name:
Custom UI Layout - Category:
provider - File:
extensions/flowgraph/nodes/ui/customUiLayout.lua
Lets you capture, store, and restore a custom UI layout. The layout is serialized with the flowgraph and can be loaded at execution time.
Pin Schema
Output Pins
| Pin | Type | Table Type | Description |
|---|---|---|---|
layout | table | layoutData | The stored layout data |
Internals
Stored State
self.storedLayout- Array of UI app definitions captured from the current layout.
Key Methods
| Method | Description |
|---|---|
_executionStarted() | Outputs stored layout wrapped as {apps, layoutName} |
drawCustomProperties() | Editor UI with Capture / Clear / Load buttons and layout copy combo |
setLayout(data) | Callback invoked by the UI when capturing the current layout |
getCmd() | Returns a Lua command string so the UI can call back into this node |
_onSerialize(res) | Persists storedLayout into flowgraph save data |
_onDeserialized(data) | Restores storedLayout from saved data |
How It Works
- In the flowgraph editor, click Capture to save the current in-game UI layout into the node.
- The node stores the raw app list (
storedLayout) and serializes it with the graph. - When the flowgraph starts execution,
_executionStartedoutputs the layout as alayoutDatatable. - Downstream nodes (e.g. a UI Layout node) can apply this layout to the game.
Editor Buttons
- Capture - Triggers
guihooks.trigger('getCurrentLayoutToLua', cmd)and stores the result. - Clear - Removes the stored layout.
- Load Stored Layout - Applies stored layout via
core_gamestate.setGameState. - Load Freeroam layout - Reverts to the default freeroam layout.
- Copy Layout from… - Copies an existing named layout into the node.
Usage Example
-- The node outputs a table like:
{
apps = { ... }, -- array of app definitions
layoutName = "procedural Layout 42"
}
-- Downstream, a UI Layout node consumes this to set the game's app layout.Key Dependencies
guihooks.trigger('getCurrentLayoutToLua', ...)- requests current layout from the UI layercore_gamestate.setGameState()- applies a game state / layout
Previously Undocumented (Added by Audit)
- Parameter fix:
getCmd(action)- parameteractionused in getCmd
See Also
- Medal / Auto Medal (Flowgraph Node) - Related reference
- Clear Messages (Flowgraph Node) - Related reference
- Context Translation (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide