API ReferenceGE Extensionsflowgraphnodesui
Popup (Flowgraph Node)
- **Node Name:** `Popup`
Overview
- Node Name:
Popup - Category: (once, singleActive)
- File:
extensions/flowgraph/nodes/ui/missionPopup.lua
Shows a modal popup that can only be dismissed by pressing a button. Commonly used for mission intro popups. Multiple popups queue sequentially.
Pin Schema
Input Pins
| Pin | Type | Hidden | Default | Description |
|---|---|---|---|---|
flow | flow | no | - | Inflow for this node |
reset | flow (impulse) | no | - | Resets the node to allow re-triggering |
title | string / table | no | - | Popup title |
text | string / table | no | - | Popup body text |
buttonText | string | yes | "ui.scenarios.start.start" | Text for the dismiss button |
Output Pins
| Pin | Type | Description |
|---|---|---|
flow | flow | Fires when the button is pressed |
Internals
| Field | Purpose |
|---|---|
self.open | Whether the popup is currently displayed |
self.done | Whether the popup has been dismissed |
self._active | Internal active state flag |
How It Works
work()- Main loop:- If
resetimpulse is active: closes dialogue, resets all state and output pins. - If not done and flow is active: calls
openDialogue(). - If already done: returns early (once behaviour).
- If
openDialogue()- Builds popup data with title, text, and a single button. Triggersguihooks.trigger('introPopupMission', data).started()- Called from the UI button's Lua command. Closes dialogue, setsflowoutput to true, marks as done.closeDialogue()- Resetsopenand_activeflags._executionStopped()- Closes dialogue if open and resets state.
The button's click handler is a Lua string that calls back into the node:
core_flowgraphManager.getManagerGraphNode(mgrId, graphId, nodeId):started()Lua Code Example
-- Equivalent guihooks call:
guihooks.trigger('introPopupMission', {
title = "Welcome to the Race",
text = "Complete 3 laps to win!",
buttons = {
{
default = true,
class = "main",
label = "ui.scenarios.start.start",
clickLua = 'core_flowgraphManager.getManagerGraphNode(1, 2, 3):started()'
}
}
})Key Dependencies
guihooks.trigger('introPopupMission', data)- Mission intro popup UIcore_flowgraphManager.getManagerGraphNode()- Node callback from UIcore_input_bindings- Listed dependency
Previously Undocumented (Added by Audit)
C:buttonPushed(action)- Function handling buttonPushed logicC:getCmd(action)- Function handling getCmd logicC:onFilteredInputChanged(devName, action, value)- Function handling onFilteredInputChanged logic
See Also
- Medal / Auto Medal (Flowgraph Node) - Related reference
- Clear Messages (Flowgraph Node) - Related reference
- Context Translation (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide