API ReferenceGE Extensionsflowgraphnodesuibuttons
Simple Button (Flowgraph Node)
- **Node Name:** `Simple Button`
Overview
- Node Name:
Simple Button - Category:
once_instant - File:
extensions/flowgraph/nodes/ui/buttons/simpleButton.lua
All-in-one button node that creates a button and monitors its click state. Combines the functionality of Create Button + Get Button in a single node. Supports auto-hiding after the first click.
Pin Schema
Input Pins
| Pin | Type | Default | Description |
|---|---|---|---|
hideWhenDone | bool | - | If true, hides the button after first click |
label | string | "Button" | Displayed name |
order | number | - | (Hidden) Button order |
style | string | "default" | (Hidden) Button styling |
Output Pins
| Pin | Type | Description |
|---|---|---|
buttonId | number | (Hidden) ID of the created button |
clicked | flow | (Impulse) Fires once when button is clicked |
used | flow | (Hidden) Fires after first click |
unused | flow | (Hidden) Fires while not yet clicked |
Legacy Pin Mapping
| Old Name | New Name |
|---|---|
complete | used |
incomplete | unused |
How It Works
_executionStarted()- ResetshiddenAfterDoneandhiddenAfterResetflags.workOnce()- Creates the button viaself.mgr.modules.button:addButton().work()- Each frame: un-hides if previously reset, reads click state, and auto-hides after completion ifhideWhenDoneis set.onNodeReset()- Hides the button when the node resets (e.g., looping).
Example Usage
-- Simplest button usage: one node does it all
-- Connect 'clicked' to whatever should happen when pressed
-- Set hideWhenDone=true to remove the button after useSee Also
- Create Button (Flowgraph Node) - Related reference
- Get Button (Flowgraph Node) - Related reference
- Get Multiple Buttons (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide