API ReferenceGE Extensionseditorutil
Zone Selector Utility
Zone selection widget for mission/quest editor - loads zones from a sites file and provides UI for selecting initial (spawn) and destination zones.
Zone selection widget for mission/quest editor - loads zones from a sites file and provides UI for selecting initial (spawn) and destination zones.
Class: C (returned by factory function)
| Method | Signature | Description |
|---|---|---|
C:init(element) | element: table | Stores element reference with zone selector state |
C:loadZonesFromSitesFile(ctd) | - | Loads zone names from {globalInfoFolder}/garages.sites.json |
C:setContainer(ctd) | - | Restores initial/destination zone arrays from container data |
C:draw(ctd, container, labelFn) | - | Renders full zone selection UI; returns true if changed |
Data Fields (on element)
| Field | Type | Description |
|---|---|---|
initialZones | {string, ...} | Selected initial zone names (spawn points) |
destinationZones | {string, ...} | Selected destination zone names |
loadedZones | {string, ...} | Cached available zone names (sorted alphabetically) |
zonesLoaded | bool | Whether zones have been loaded from file |
sitesFile | string | Cached sites file path |
Usage Example
-- Zone selector is typically used via editorElementHelper:
local helper = require('/lua/ge/extensions/editor/util/editorElementHelper')({}, 'mission')
helper:addZoneSelector("Zones", "zones", "globalInfoFolder")
helper:setContainer(missionContainer)
helper:draw()
-- The UI provides:
-- * "Initial Zones" section with dropdown to add zones
-- - Select All / Remove All buttons
-- - Scrollable list with per-zone Remove buttons
-- * "Destination Zones" section (same layout)
-- * Summary showing count of selected zones
-- Saved data structure (in missionTypeData):
-- ctd["zones_initialZones"] = {"zone_a", "zone_b"}
-- ctd["zones_destinationZones"] = {"zone_c", "zone_d"}
-- Zones are loaded from garages.sites.json via gameplay_sites_sitesManager
-- The globalInfoFolder field tells the selector where to find the sites file
-- Zones are cached and only reloaded when the folder path changes
-- Example sites file structure:
-- {
-- "zones": {
-- "sorted": [
-- {"name": "zone_downtown"},
-- {"name": "zone_highway"},
-- {"name": "zone_suburb"}
-- ]
-- }
-- }See Also
- Editor Element Helper - Related reference
- Plot Helper Utility - Related reference
- Search Utility - Related reference
- World Editor Guide - Guide
Vehicle Select Utility
Vehicle model/config/paint selector widget for ImGui - provides dropdowns for vehicle type, model, config, paint layers, and optional custom config paths.
Vehicle Editor - Toolbar
Main toolbar for the Vehicle Editor providing tabbed switching between Static and Live editor modes, app menus, layout management, vehicle spawn/remove controls, and camera/time-of-day sliders.