API ReferenceGE Extensionsflowgraphnodesuibuttons
Create Button (Flowgraph Node)
- **Node Name:** `Create Button`
Overview
- Node Name:
Create Button - Category:
once_instant - File:
extensions/flowgraph/nodes/ui/buttons/createButton.lua
Creates a new UI button through the flowgraph button module and outputs its ID for use with other button nodes.
Pin Schema
Input Pins
| Pin | Type | Default | Description |
|---|---|---|---|
label | string | "Button" | Displayed name of the button |
active | bool | true | (Hidden) Whether the button is active |
order | number | - | (Hidden) Button order in the list (auto if empty) |
style | string | "default" | (Hidden) Button styling |
Output Pins
| Pin | Type | Description |
|---|---|---|
buttonId | number | ID of the created button |
How It Works
postInit()- Sets up hard templates for the style pin (currently just"default").workOnce()- Callsself.mgr.modules.button:addButton()with label, active, order, and style. Returns the button ID.
Key Dependencies
self.mgr.modules.button- the flowgraph button module that manages UI buttons.
Example Usage
-- Create a button, then use getButton or simpleButton to check clicks
local id = self.mgr.modules.button:addButton({
label = "Start Race",
active = true,
order = 1,
style = "default"
})See Also
- Get Button (Flowgraph Node) - Related reference
- Get Multiple Buttons (Flowgraph Node) - Related reference
- Set Button Property (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide