Flowgraph Examples
Flowgraph manager window for browsing and loading example flowgraph projects from a categorized library with search support.
Flowgraph manager window for browsing and loading example flowgraph projects from a categorized library with search support.
Overview
fg_examples scans /lua/ge/extensions/flowgraph/examples/ for .flow.json files and presents them in a hierarchical tree view organized by folder (beginner, intermediate, expert, nodes). Users can search examples by name or browse the tree. Selecting an example loads it as a new flowgraph manager. Uses frecency-based search scoring.
Class Fields
| Field | Type | Description |
|---|---|---|
C.windowName | string | 'fg_examples' |
C.windowDescription | string | 'Examples' |
C.arrowControllable | bool | true - supports keyboard arrow navigation |
Class Methods
| Method | Description |
|---|---|
C:init() | Registers window, initializes search utility |
C:attach(mgr) | Binds to a flowgraph manager |
C:loadExamples() | Scans examples directory, builds tree + lookup table |
C:getExamplesLookup() | Returns the examples tree and flat lookup |
C:draw() | Draws search input + results or tree view |
C:drawSearchInput() | Renders the search text field |
C:findExamples(match) | Queries search index for matching examples |
C:findStuff() | Performs the search when input changes |
C:displayResults() | Renders search results with highlighted matches |
C:displayTreeView() | Renders the folder tree with sorted examples |
C:manageClick(result) | Loads the clicked example as a new manager |
C:createNode() | Triggers selection of current highlighted item |
C:navigateList(up) | Arrow key navigation through results |
Usage Example
-- Examples are auto-discovered from the examples directory
-- Each example has: data (parsed JSON), path, sourcePath, splitPath
-- Loading an example creates a new flowgraph manager:
local mgr = core_flowgraphManager.addManager(result.info.data)Additional Class Methods
| Method | Description |
|---|---|
C:highlightText(label, highlightText) | Renders text with search match highlighting |
C:recursiveTreeView(element, depth) | Recursively renders folder tree with sorted examples |
C:handleActionMap() | Manages NodeLibrary action map when window is focused |
C:arrowHelper(cursor, itemSize, doHover) | Keyboard arrow navigation helper with selection highlight |
See Also
- Flowgraph Base Window - Related reference
- Flowgraph Events - Related reference
- Flowgraph Execution (Task Manager) - Related reference
- World Editor Guide - Guide
Flowgraph Events
Flowgraph manager window displaying a scrollable event log with timestamps, severity levels, color coding, and clickable navigation to source nodes/graphs.
Flowgraph Execution (Task Manager)
Flowgraph Task Manager window for starting, stopping, and managing all loaded flowgraph projects with mission variable integration.