API ReferenceGE Extensionseditor
Road River GUI
Shared GUI utilities for the Road/River editor tools, providing highlight colors, node sizing, and toolbar creation.
Shared GUI utilities for the Road/River editor tools, providing highlight colors, node sizing, and toolbar creation.
Public Fields
| Field | Type | Description |
|---|---|---|
M.highlightColors | table | Color definitions for hover, selection, duplication, cursors, and node states |
M.nodeSizeFactor | number | Scale factor for node rendering (0.012) |
M.editModeToolbar | function | Renders the Add Road/River/Nodes toolbar button |
Highlight Colors
| Key | Color | Usage |
|---|---|---|
hover | Blue | Hovered element |
selected | Orange | Selected element |
duplicated | Green | Duplicated element |
cursor | Gray | Default cursor |
createModeCursor | Green | Cursor in create mode |
selectedNode | White | Selected node |
hoveredNode | Yellow | Hovered node |
node | Red | Default node |
Usage Example
-- Access shared colors from road/river editors
local gui = require('editor/roadRiverGui')
local colors = gui.highlightColors
debugDrawer:drawSphere(pos, 0.5, colors.selected)
-- Render toolbar in editor GUI
gui.isRoad = true
gui.editModeToolbar()
if gui.createMode then
-- Handle node creation
endSee Also
- Editor AI Tests - Related reference
- Editor AI Visualization - Related reference
- Editor – Assembly Spline Tool - Related reference
- World Editor Guide - Guide
Road River Cache Handler
Handles cache invalidation for DecalRoad vertices when prefabs are exploded and when the editor initializes.
Road Spline Editor
Main editor tool for creating and managing road splines - multi-layered DecalRoad-based road systems with support for materials, auto-generated detail layers, terrain painting, undo/redo, bitmap impor