Skip to content

Feature Editor Floating Panels

Brennan Hatton edited this page Sep 25, 2026 · 5 revisions

Editor floating panels + template-type menus + on-top teleport

Since: v0.115.0 — PR #156

Three new in-world UI families that float above editor templates plus a landing-on-top default teleport so authors can scan and edit templates without first stepping inside the cage. Applies uniformly to every editor category — carriages, contents, parts (FLOOR / WALLS / ROOF / DOORS), tracks, pillar sections, stairs adjuncts, tunnels.

Per-plot label panel

A small floating panel hovers above each stamped template's cage. Always visible: the template name and pick weight (×N). Visible only when the player is standing in (or on top of) that specific plot:

  • [ - ] ×N [ + ] — weight arrows; click to bump up or down.
  • [ Save ] [ R ] [ C ] — Save / Reset / Clear, proportional widths (70% / 15% / 15%). Same dispatch the keyboard menu uses; targets the panel's specific plot regardless of where the player is standing.
  • [ Contents ] — carriage panels only; opens the per-carriage Contents allow-list drilldown.
  • [ Enter ] — teleports the player inside the cage (under the default on-top landing). Visible only when already inPlot. Carriages, contents and dimensional carriages land in the −X front doorway, facing in; shift-click lands at the footprint centre instead. Either way the landing steps to the nearest free two-block column, so a walled-up doorway puts you one block inside rather than in the wall (EditorPlotArrival.inside). Tracks, pillars, tunnels and parts have no doorway and land at the centre, with the same free-space check.

A bright green frame draws around the panel for the player's current plot — the same visual cue used in the row's start menu's active-row tint.

Click the panel's name anywhere (in or out of plot) to teleport to that template.

Template-type menu

Superseded in v0.135.0 by the Template navigation menu. The per-row panel was replaced with a wider nav panel that adds a category bar, a tab strip across every type in the active category, and inline sub-variant cells next to every variant that has children. The section below describes the original v0.115.0 behaviour for archival reference.

A second panel floats at the start of every variant row in the active category — one menu per row. Header shows the type name (e.g. Carriages, Floor, Pillar Bottom, Tunnel Section); below it, every variant in the row appears as a row with a name cell and a weight cell. Cells are independently clickable:

  • Header click — teleport to the first variant in this row. Useful as a "jump to start of this row" shortcut.
  • Variant name click — teleport to that variant's plot.
  • Weight cell click — +1 (shift-click -1). Same per-category weight slash command the per-plot panel's ± arrows dispatch.
  • Active row — soft green tint highlights the variant the player is currently standing in. Same green family as the in-plot panel border.

When the player is inside a plot, a companion duplicate of that template's type menu floats next to the per-plot panel, stepped along the plot's grid axis (+Z) past the plot panel's width. Each companion holds its own facing, so it turns independently of the plot panel beside it.

On-top default teleport

Every editor enter() method now defaults to landing the player on top of the cage (Y = origin.y + footprint.y + 1) instead of inside it (Y = origin.y + 1) — and since v0.907.0, in front of the plot's floating menu, facing it: three blocks along −X from the panel's anchor (EditorPlotLabels.anchorAbove, the +X back edge, Z-centred), yaw −90. EditorPlotArrival derives the spot from the same anchor the panel renders at, so the two cannot drift; short plots clamp to their own −X edge. Applies to:

  • /dt editor enter <variant> — carriages
  • /dt editor contents enter <id> — contents
  • /dt editor part enter <kind> <name> — parts
  • /dt editor track enter — track tile
  • /dt editor pillar enter <bare-name> — pillar sections + adjuncts
  • /dt editor enter tunnel_<variant> — tunnels

…plus every label-panel name click, every type-menu name click, and every type-menu header click — they all dispatch the same enter slash commands.

plotContaining upper Y bound was bumped by +2 in every editor's containment check so a player on top of the cage still counts as inPlot: the green border, action row, and Enter button stay visible.

Entering a plot you are already standing in does not restamp it. The X menu's Go here is offered even while inside the selected template (alongside ● you are here); the walk is a teleport to the menu spot, and the editors skip the erase-and-restamp so unsaved edits survive. Entering from anywhere else — or a contents enter that names a different shell — restamps as before.

The per-plot panel's new [Enter] button reverses this — it dispatches a new EditorPlotActionPacket.Action.ENTER_INSIDE that calls enter(player, model, false) to drop the player to the floor.

Facing and the ↻ button

Since PR #1550.

Panels no longer billboard to follow the camera. Each panel turns to face the player the first frame it appears, and again after any teleport (a client-side jump of more than 8 blocks in one tick, or a dimension change), then holds still as the player walks around it.

Every panel (per-plot panels, nav menus, companions, Stages, the Welcome board, Stage Blocks and the Stage Palette) carries a ↻ button in its top-right corner:

  • Click turns just that panel to face the player.
  • Shift-click snaps it to the grid-aligned default: door panels face +X (or +Z on Tracks / Dimensional Carriages rows), plot panels face -X.

Each panel has its own facing and spins about its own centre. Panels placed beside another (companions, the Welcome board) are positioned along their parent's grid axis, so turning one never moves another. The Z (block variant) and C (container) menus are unaffected.

Implementation: client/menu/EditorPanelFacing (the per-panel facing store, keyed per panel; renderer and raycast of a panel share the key) and EditorPanelFacingEvents (teleport/logout re-arm, the shared click handler).

The floating Packages board that used to sit at the editor entrance is no longer shown; packages remain in the X menu.

Worldspace scaling

Both panel families consume ClientDisplayConfig.getWorldspaceScale() (the same value the X menu, parts panel, and block-variant menu use), so the Options menu's worldspace slider scales them in real time. Their raycasts divide the camera-ray hit by the same scale so cell rectangles stay aligned with the visible cells regardless of the player's chosen size.

Networking

Three new packets:

  • EditorPlotLabelsPacket — server → client snapshot of the per-plot label state for the active editor category. Per-player, dedup'd.
  • EditorPlotActionPacket — client → server SAVE / RESET / CLEAR / ENTER_INSIDE actions, keyed by (category, modelId, modelName) so the server targets the correct plot without needing the player to be there.
  • EditorTypeMenusPacket — server → client snapshot of the type menus with an isCompanion flag for the in-plot duplicate.

All three live on PROTOCOL_VERSION = "19". A new EditorStampedCategoryState global tracks which category is currently stamped so the panels persist as long as the structures themselves are present — leaving the cage doesn't clear the panels.

Editor Menus mode: Auto, and Menu Distance

Since: v0.678.0 — PR #1127

The master Editor Menus row on the X-menu was a two-state toggle (On / Off). It now has a third position, Auto, which is the default for a fresh session:

  • Auto, between plots — every plot panel draws, same as On.
  • Auto, inside a template — only that plot's panel draws; every other plot's panel stops rendering (and stops being hoverable/clickable) until the player steps out. Auto additionally caps every world-space editor menu — plot panels, type-menu rows, the help board, the Stages panels — to 15 blocks from the camera while inside a template.
  • On — every plot's panel draws at any distance, in or out of a template. The escape hatch for seeing the whole board at once.
  • Off — no world-space editor panel draws.

/dt editor editormenus on|auto|off drives the same state the X-menu row does.

A second, independent stepper — Menu Distance — sits directly below the Editor Menus row: [ - ] Menu Distance: N [ + ]. It caps how far any world-space editor menu draws, in every mode and whether or not the player is in a template. Default 128, range 5–256, steps of 8. Where Auto's fixed 15-block in-template rule and the player's own Menu Distance both apply, the smaller of the two wins. The value is a client display preference (dungeontrain-client.toml, [editorMenus] section) — it follows the player across worlds and needs no server round-trip.

Prior to this change, Editor Menus' On/Off state rode on the same status packet that clears whenever the player steps out of a plot, which reset Off back to On on every exit. The state now has its own packet (EditorMenusModePacket) so it persists for the session regardless of where the player is standing.

Clone this wiki locally