RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Editor AI TestsEditor AI VisualizationEditor – Assembly Spline ToolAsset BrowserAsset DeduplicatorAsset Management ToolSFX Previewer (Audio Events List)Audio Ribbon EditorAutoSaveBarriers EditorBiome ToolBuilding EditorBulk RenameCamera BookmarksCamera TransformCamera Path EditorCEF HelperCo-Simulation Signal EditorCrawl Data EditorCreate Object ToolDataBlock EditorDecal EditorDecal Spline EditorDocumentation HelperDrag Race EditorDrift Data EditorDrive Path EditorDynamic Decals Tool (Vehicle Livery Creator)Engine Audio DebugExtensions DebugExtensions EditorFFI Pointer Leak TestFile DialogFlowgraph EditorForest EditorForest ViewEditor Gizmo HelperEditor Ground Model Debug HelperEditor Headless Editor TestEditor Icon OverviewEditor ImGui C DemoEditor InspectorEditor Layout ManagerEditor Level SettingsEditor Level ValidatorEditor LoggerEditor Log HelperEditor MainEditor Main MenuEditor Main ToolbarEditor Main UpdateMap Sensor EditorMaster Spline EditorMaterial EditorMeasures Inspector HeaderMesh Editor (Base)Mesh Road EditorMesh Spline EditorMission EditorMission PlaybookMission Start Position EditorMulti Spawn Manager (Vehicle Groups)Navigation Mesh EditorEditor News MessageObject Tool (Object Select Edit Mode)Object To Spline EditorParticle EditorPerformance Profiler / Camera RecorderPhysics ReloaderPrefab Instance EditorEditor PreferencesRace / Path EditorRally EditorRaycast Test Editor ToolRenderer Components Editor ToolRender Test Editor ToolResource Checker Editor ToolRiver EditorRoad Architect EditorRoad DecorationsRoad Editor (Decal Road)Road Network ExporterRoad River Cache HandlerRoad River GUIRoad Spline EditorRoad Template EditorRoad UtilitiesScene TreeScene ViewScreenshot Creator BootstrapScript AI EditorScript AI ManagerSensor Configuration EditorSensor DebuggerShape EditorShortcut LegendSidewalk Spline EditorSites EditorSlot Traffic EditorSuspension Audio DebugTech Server ManagerTerraform ToolTerrain And Road ImporterTerrain EditorTerrain Materials EditorText EditorTool ManagerTool ShortcutsTraffic DebugTraffic ManagerTraffic Signals EditorUndo History ViewerVehicle Bridge TestVehicle Detail ViewerVehicle Editor MainEditor - VisualizationEditor Viz HelperEditor Water Object HelperEditor Windows Manager
Gen Decal EditorGen Experimental Frame EditorGen Mesh ExplorerGen Experimental SolidFlexGen Mesh ModuleGen Network ModuleGen Region ModuleGen Render ModuleGen Terrain ModuleEditor Gen TestEditor Gen Top (Roof Geometry)Editor Gen UI (Building Architect UI)Editor Gen UtilsEditor Gen World
Gen AI LibraryGen JBeam LibraryGen UI Library

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE Extensionseditorgenlib

Gen UI Library

ImGui widget library providing reusable UI components for the gen editor framework.

ImGui widget library providing reusable UI components for the gen editor framework.


Overview

The ui library module supplies styled buttons, icons, column layouts, and label utilities used across all gen editor windows. It loads icon textures from the gen assets folder and provides consistent color theming.


Module Table: M

FieldTypeDescription
M.colorNavImVec4Navigation highlight color (blue-ish)
M.colorOffImVec4Disabled/off color
M.cbutOffImVec4Button off color (dim)
M.cbutOnImVec4Button on color (bright)

Functions

FunctionSignatureDescription
M.columnRight(width, border)(number, boolean?)Sets up a 2-column layout with right column at specified width
M.buttonTxt(key, txt, dim, c, cbg, shift, center)(string, string, ImVec2?, ImVec4?, table|ImVec4?, ImVec2?, boolean?)Renders a text-overlay button using an icon background
M.buttonImg(kv, src, dim, c, cbg, scale, shift)(string|table, string, ImVec2?, ImVec4?, ImVec4?, vec3?, ImVec2?)Renders an icon image button with optional scaling
M.check(lbl, key, val)(string, string, boolean?)Checkbox widget bound to env.ui[key]
M.sliderC(lbl, key, mm, isint, format)(string, string, table, boolean?, string?)Two-column slider (label left, slider right via NextColumn)
M.slider(lbl, key, mm, isint, format)(string, string, table, boolean?, string?)Inline slider widget
M.check_(lbl, key)(string, string)Checkbox variant reading value from env.ui[key]
M.combo(lbl, key, list, isel)(string, string, table, number?)Combo/dropdown widget
M.table(id, data, cb, adim, ahead, cbsort)(string, table?, function, table, table?, function?)ImGui table with optional sortable headers. Calls cb(k,v) per row
M.listBox(row, dim, lineH)(table, any, number)List box with star favorites and two-column layout
M.tree2ui(htree)(table?)Renders hint/hotkey tree as inline pill-style labels
M.tree2ui_(htree)(table?)Alternative hint tree renderer with vertical spacing and background rects

Color Constants

ConstantValueUsage
colorOn(0.5, 0.7, 0.5, 1)Active/enabled state
colorOff(0.5, 0.5, 0.5, 0.7)Inactive/disabled state
bgActive(0.3, 0.3, 0.3, 1)Active background

Icons

Icons are loaded from /lua/ge/extensions/editor/gen/assets/_icon/:

KeyFileUV Coords
carcar.pngFull image
folderfolder.pngFull image
linklink.pngVertical crop (0.2–0.8)
mglassmglass.pngFull image
graphgraph.pngFull image (slight overflow)
starstar.pngPadded (0.1–0.9)
window3window3.pngPadded (0.1–0.9)

Usage Example

local UI = require('/lua/ge/extensions/editor/gen/lib/ui')

-- Create a right-aligned column layout
UI.columnRight(200)

-- Render a styled text button
UI.buttonTxt('myButton', 'Click Me', nil, UI.colorNav)

-- Use navigation color for active elements
im.TextColored(UI.colorNav, "Active Item")

Note on Local Functions

  • labelHide(shift, lbl) - Local (not exported). Draws a background rectangle to hide default ImGui labels.

See Also

  • Gen Utils - Core utility functions
  • Gen Mesh Explorer - Uses UI lib extensively
  • Gen Render - Debug rendering

Gen JBeam Library

JBeam file parsing library for the gen editor's mesh and vehicle inspection tools.

Master Spline - Auto Road Generation

Generates roads between waypoints using A* pathfinding on the terrain heightmap grid. Handles slope avoidance, turning radius constraints, hairpin widening, and elevation optimization against road des

On this page

OverviewModule Table: MFunctionsColor ConstantsIconsUsage ExampleNote on Local FunctionsSee Also