Drag Race Editor Constants
Centralized constants for the Drag Race Editor. Defines window settings, drag race types, phase names, tree types, context types, default transforms, UI dimensions, and debug colors.
Centralized constants for the Drag Race Editor. Defines window settings, drag race types, phase names, tree types, context types, default transforms, UI dimensions, and debug colors.
Module: M.CONSTANTS
Window
| Constant | Value | Description |
|---|---|---|
WINDOW_NAME | "Drag Race Editor" | ImGui window title |
WINDOW_SIZE | {x=1800, y=900} | Default window dimensions |
File I/O
| Constant | Value | Description |
|---|---|---|
DEFAULT_FILE_DIR | "/levels/" | Default file dialog directory |
FILE_EXTENSION | ".dragSettings.json" | Settings file extension |
Enumerations
| Constant | Values |
|---|---|
DRAG_TYPES | "headsUpRace", "bracketRace", "dragPracticeRace" |
RACE_PHASES | "stage", "countdown", "race", "stop" |
TREE_TYPES | ".400", ".500" |
CONTEXT_TYPES | "freeroam", "activity" |
Defaults
| Constant | Value |
|---|---|
DEFAULT_TRANSFORM | {position={0,0,0}, rotation={0,0,0,w=1}, scale={1,1,1}} |
DEFAULT_WAYPOINT | {speed=5, mode="limit"} |
Colors
| Name | Value |
|---|---|
WHITE | ColorF(1,1,1,1) |
BLACK | ColorI(0,0,0,192) |
RED | ColorF(1,0,0,0.8) |
GREEN | ColorF(0,1,0,0.8) |
BLUE | ColorF(0,0,1,0.8) |
YELLOW | ColorF(1,1,0,0.8) |
SUCCESS | Green ImVec4 |
WARNING | Yellow ImVec4 |
ERROR | Red ImVec4 |
UI
| Constant | Value |
|---|---|
INPUT_WIDTH | 120 |
BUTTON_HEIGHT | 20 |
SPACING | 5 |
Usage Example
local constants = require('editor/dragRaceEditor/constants')
local winName = constants.CONSTANTS.WINDOW_NAME
local types = constants.CONSTANTS.DRAG_TYPESSee Also
- Drag Race Editor - Drag Settings - Related reference
- Drag Race Editor - Facilities - Related reference
- Drag Race Editor - Lanes - Related reference
- World Editor Guide - Guide
Decal Spline Manager
Core data management module for decal splines. Handles CRUD operations, deep copy, serialization, undo/redo, profile copy/paste, spline splitting/joining, bitmap import, and dirty-state updates.
Drag Race Editor - Drag Settings
Manages drag race settings files (`.dragSettings.json`). Handles loading/saving, UI rendering for settings details, phases, prefabs, and validation.