> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rollingquest.kramgames.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Editor Interface

> Detailed description of the RollingQuest level editor UI: HUD, panels, menus, and visual feedback systems.

The editor interface consists of a 3D viewport surrounded by UI panels and overlays. Understanding each component helps you work efficiently.

## 3D Viewport

The main workspace where you see and interact with your level. It contains:

* **Block Selector** — A wireframe cursor highlighting the current grid position. Shows colored faces for selected sides.
* **Placed Blocks** — Cubes rendered with the current theme's materials and lighting.
* **Elements** — Items, enemies, balls, and decorations attached to block sides.
* **Direction Arrows** — Visual indicators showing the orientation of balls, enemies, and decorations.
* **Skybox** — The themed background environment with optional grid overlay.

## Permanent Info Panel (HUD)

The HUD displays persistent information in the viewport. It has three sections:

### Blocks Info (Top-Left)

Shows the current state of the editor:

* **Action feedback** — Color-coded messages for recent operations (e.g., "Inserted Block \[Stone]", "Removed Block \[1, 0, 0]")
* **Current Block Template** — The template selected in the Blocks Pool (e.g., `[Stone]`)
* **Selector Position** — The 3D grid coordinates of the selector (e.g., `[1, 0, 0]`)
* **Selected Block** — The block currently selected/grabbed (template name and ID)
* **Selected Side** — The side currently selected on a block (template name and ID)

### Camera Info (Top-Right)

Displays the camera's current state:

* **Position** — 3D world coordinates `[x, y, z]`
* **Rotation** — Euler angles `[pitch, yaw]`
* **3D Axis Indicator** — A small gizmo showing the current camera orientation

### Score Info (Bottom-Left)

Live calculation of the level's score metrics:

* **Max Score** — Total score from all blocks, items, and enemies
* **Treasures** — Number of treasure items placed
* **Fruits** — Number of fruit items placed
* **Keys** — Number of key items placed
* **Best Timestamp** — Your best completion time (if tested)

### Help Panel (Toggle with F1)

Two states:

* **Collapsed** — Shows only the toggle hint
* **Expanded** — Lists all keyboard shortcuts with their key bindings

## Pool Panels

When you press **B**, **I**, **P**, **O**, or **U**, a pool panel opens showing a grid of available templates from the current theme:

* **Template Grid** — Scrollable grid of template thumbnails
* **Selection** — Click or use arrow keys to select a template
* **None Option** — Items, balls, enemies, and decorations have a "None" option to remove the element
* **Locked Templates** — Some templates are locked behind progression (shown with "???")

Selecting a template from the pool automatically closes the panel and applies the selection.

## Property Menus

### Element Properties (**V**)

Opens when you press **V** on a selected side. Contains:

* **Type** — Change the element template
* **Script** — Attach a Lua script
* **Variables** — Set local script variables
* **Direction** — Set orientation (North/East/South/West)
* **Skin** — Choose visual variant (balls only)
* **Order** — Set execution priority (balls only)
* **Enemy Interactions** — Configure hazard interactions (enemies only)
* **Item Respawn** — Enable/disable and set timer (items only)
* **Ball Style** — Select pattern style (pattern balls only)

### Level Properties (Escape → Level Properties)

Global settings for the entire level:

* Max Time, Initial Time, Lives, Hourglass, Infinite Lives
* Script attachment for level-wide behavior
* Sections management

### Section Properties

Per-section settings accessible from the Sections Editor:

* Theme selection with preview
* Music selection
* Dark Mode toggle
* Skybox Grid toggle
* Lava Pool configuration

## Modal Dialogs

* **Yes/No Popup** — Confirmation dialogs for destructive actions (discard changes, delete level, overwrite save)
* **Loading Panel** — Full-screen overlay shown during level loading/reloading

<Note>
  The editor uses a singleton menu system — only one menu can be active at a time. Opening a new menu automatically closes the previous one (except for nested sub-menus like theme/music selectors).
</Note>
