Sites Editor - Sorted List Display
Generic sorted list UI wrapper for the Sites Editor. Manages element selection (single/multi), search filtering, custom fields, tags, name/color editing, and delegates to element-specific editors.
Generic sorted list UI wrapper for the Sites Editor. Manages element selection (single/multi), search filtering, custom fields, tags, name/color editing, and delegates to element-specific editors.
Class Methods
| Method | Description |
|---|---|
C:init(sitesEditor, key, elementEditor) | Initializes with parent editor, data key, and element editor |
C:setSites(sites) | Binds to sites data, builds tag index from all elements |
C:selected() | Resets selection, sets all objects to normal draw mode |
C:unselect() | Clears selection, fades all objects |
C:selectElement(id, mode) | Selects/toggles element by id with optional multi-select mode |
C:updateSharedSelectedTags() | Computes tags shared across all selected elements |
C:draw(mouseInfo) | Draws the full panel with input handling |
C:input() | Handles mouse click (select) and shift-click (create) |
C:setField(name, value) | Sets a named field on all selected elements with undo |
C:drawList() | Renders search bar, scrollable element list, and property panel |
C:drawCustomFields(fields) | Renders editable custom fields (string, number, vec3) |
C:drawTags() | Renders tag display with add/remove/popup UI |
C:addTag() | Adds a tag to all selected elements and updates counts |
C:getCurrentSelected() | Returns the currently selected element object |
Example: Using the Sorted List Display
-- Created internally by sitesEditor during onEditorInitialized:
local locations = require('editor/sitesEditor/locations')(M, 'locations')
local locationsList = require('editor/sitesEditor/sortedListDisplay')(M, 'locations', locations)
locationsList.windowDescription = "Locations"
-- Configuration flags:
locationsList.createByShift = true -- Shift+click to create
locationsList.selectByClick = true -- Click to select
-- The list supports multi-selection via Ctrl/Shift keys
-- Custom fields can be string, number, or vec3 type
-- Tags can be added, removed, and browsed via combo dropdown
-- Copy/Paste fields between objects is supportedSee Also
- Sites Editor - Locations - Related reference
- Sites Editor - Parking Spots - Related reference
- Sites Editor - Tags - Related reference
- World Editor Guide - Guide
Sites Editor - Parking Spots
Sub-editor for managing parking spot elements within the Sites Editor. Supports position/rotation/scale editing via transformUtil, vehicle scale presets, and multi-spot configurations.
Sites Editor - Tags
Tag management sub-editor for the Sites Editor. Displays all tags in a two-column layout (has/doesn't-have), allowing bulk tag assignment and removal across elements.