ui/flowgraph/editor Reference
Module defined in `lua/common/extensions/ui/flowgraph/editor.lua`. Flowgraph visual scripting editor API - type system, node categories, variable editors, vehicle selectors, and display utilities.
Module defined in lua/common/extensions/ui/flowgraph/editor.lua. Flowgraph visual scripting editor API - type system, node categories, variable editors, vehicle selectors, and display utilities.
Exports
Functions
M.getSimpleTypes()
Get list of simple data types.
- Returns: table -
{'number', 'bool', 'string', 'vec3', 'quat', 'color'}
M.getTypes()
Get all available flowgraph data types.
- Returns: table - Array of type name strings
M.getGraphTypes()
Get available graph types.
- Returns: table - Array of graph type strings
M.getTypeColor(dataType)
Get the ImGui color for a data type.
- Parameters:
dataType- string - Type name
- Returns: ImVec4 - Color (defaults to brown for unknown types)
M.getTypeIcon(dataType)
Get the icon identifier for a data type.
- Parameters:
dataType- string - Type name
- Returns: string - Icon name (defaults to
M.detaultIconType)
M.tooltip(message)
Show an ImGui tooltip with the given message.
- Parameters:
message- string - Tooltip text
M.vehicleSelector(label)
ImGui vehicle selector dropdown widget.
M.vehicleSelectorRefresh()
Refresh the vehicle selector's cached vehicle list.
M.shortDisplay(value, dataType)
Compact inline display of a value for the given data type.
M.shortValueString(value, dataType)
Get a short string representation of a value.
M.fullDisplay(value, dataType)
Full detailed display of a value for the given data type.
M.fullValueString(value, dataType)
Get a full string representation of a value.
M.variableEditor(variable)
ImGui editor widget for a flowgraph variable.
M.isFunctionalNode(nodeType)
Check if a node type is a functional node.
M.isSimpleNode(nodeType)
Check if a node type is a simple node.
M.shortValueString(value, tpe)
Get a short string representation of a value.
- Parameters:
value- any - Value to stringifytpe- string - Type name
- Returns: string - Short display string
M.shortDisplay(value, tpe)
Render a short inline display of a value in ImGui.
- Parameters:
value- any - Value to displaytpe- string - Type name
M.fullValueString(value, tpe)
Get a full string representation of a value.
- Parameters:
value- any - Value to stringifytpe- string - Type name
- Returns: string - Full display string
M.fullDisplay(value, tpe)
Render a full display of a value in ImGui.
- Parameters:
value- any - Value to displaytpe- string - Type name
M.variableEditor(source, name, displayOptions)
Render an inline variable editor widget.
- Parameters:
source- table - Data source containing the variablename- string - Variable name/keydisplayOptions- table|nil - Display configuration
M.vehicleSelectorRefresh(self, onlyModel)
Refresh the vehicle selector data.
- Parameters:
self- table - Node/context with vehicle dataonlyModel- boolean|nil - Only show model names
M.vehicleSelector(self, onlyModel)
Render a vehicle selector widget with search.
- Parameters:
self- table - Node/contextonlyModel- boolean|nil - Only show model names
M.isFunctionalNode(category) / M.isSimpleNode(category) / M.isDurationNode(category) / M.isF_DurationNode(category) / M.isOnceNode(category) / M.isDynamicNode(category)
Check if a node category matches a specific behaviour type.
- Parameters:
category- string - Node category string
- Returns: boolean
M.getBehaviourIcon(behaviour)
Get the icon for a node behaviour type.
- Parameters:
behaviour- string - Behaviour name
- Returns: string - Icon identifier
M.getBehaviourDescription(behaviour)
Get the description for a node behaviour type.
- Parameters:
behaviour- string - Behaviour name
- Returns: string - Description
M.getAutoTypeFromName(name)
Infer a data type from a pin/variable name.
- Parameters:
name- string - Pin or variable name
- Returns:
self(module table, for chaining)
Variables
M.flowgraphVersion
- Type: number (0.2)
- Description: Current flowgraph format version
M.nodeColors
- Type: table
- Description: Color definitions for node categories (custom, logic, events, etc.)
M.nodeIcons
- Type: table
- Description: Icon assignments for node categories
M.defaultTypeIconSize
- Type: number (18)
- Description: Default pixel size for type icons
M.detaultIconType
- Type: string ("fg_type_circle")
- Description: Fallback icon for unknown types
Internal Notes
- Version 0.2 changed to flat lists for graphs (breaking from 0.1)
- Vehicle selector uses
searchUtilfor fuzzy matching - Node categories:
repeat_instant,simple,repeat_p_duration,repeat_f_duration,once_instant,dynamic_instant - Type colors map to ImVec4 for wire/pin coloring
ui/flowgraph/editor_api_luaintf Reference
Module defined in `lua/common/extensions/ui/flowgraph/editor_api_luaintf.lua`. Lua bindings for the flowgraph node editor C++ API (`Engine.fge`). Provides ID types, enum constants, and editor control
ExpressionParser Reference
Module defined in `lua/common/jbeam/expressionParser.lua`. Parses and evaluates `$=` expressions in JBeam data, providing a sandboxed math environment with variable substitution.