editor: readable names in inspector, status hover, asset browser and outliner filter, waypoint buttons and long inspector labels wrap, library keeps no collision, autosave no longer hides fresher messages, old menu play-test path removed, task runner always finishes (no stuck loading), play-test starts bound to their level

This commit is contained in:
MineTec committed 2026-11-07 12:48:43 +01:00
1 parent 4a58910fba
commit 22a61246fc
26 files changed
+804 -271

No files matched your search

+15 -1
View File
@@ -33,6 +33,16 @@ Ctrl+Z/Y/Shift+Z, Ctrl+X/C/V, Ctrl+A, Ctrl+B build, F5 play, F1 help. Single key
text field has the focus; while the GL canvas has the focus a `KeyEventDispatcher` maps keys to
actions (AWT canvases do not get Swing key bindings).
* Status messages: `ctx.status(msg)` shows a message for ~6 s; the autosave note uses
`backgroundStatus`, which waits until a fresher user message has expired (it no longer replaces e.g.
the glTF export result).
* Inspector property labels have a fixed 118 px column; longer labels wrap onto more lines
(`InspectorPanel.fitLabel`) instead of being cut ("Exclude from build").
* Readable names everywhere (`img/editor/ui_readable_names.jpg`: outliner filter "coin 3", inspector
"Coin 3", status bar hover "Coin 3"/"Tile 41, 66 · Model 87", asset tab "Model 0"); inspector button
rows wrap without clipping in a narrow dock (`ui_waypoint_buttons_narrow.jpg`); long property labels
wrap (`ui_inspector_label_wrap.jpg`).
## Architecture
| Class | Role |
@@ -44,7 +54,9 @@ actions (AWT canvases do not get Swing key bindings).
| `Document` | `Project` + `History` + file + autosave state; `dirty()` |
| `Selection` | ordered node set, primary = last, listeners get the source (avoid echo loops), auto-pruned |
| `ProjectController` | new/open/save/save as/recent, autosave + recovery, thumbnail, import/export |
| `PlayTest` | check, background build, play-test |
| `PlayTest` | check, background build, install/mod-selection/save-slot helpers for the play-test plugin (the old menu-based `play()` is gone; `level.play` is a disabled placeholder that `PlaytestEditorPlugin` replaces) |
| `TaskRunner` | `runTask`: one background task on its own daemon thread; progress and completion are posted with `invokeLater` from that thread, so the completion always runs after the last progress update, also when the task or the done callback throws (replaced `SwingWorker`, whose `done()` goes through a Swing timer) |
| `NodeNames` | readable names shared by outliner, inspector header, status-bar hover, reference buttons and the Tile models asset tab ("Floor 2", "Coin 3", "Waypoint 4 (chain 2)", "Tile 3, 4 · Model 12", "Model 12"); numbers follow the level order |
| `view.SceneRenderer` | scene model → `RenderScene`, live, stable pick ids |
| `view.Thumbnails` | software rasteriser for asset thumbnails |
| `tools.SelectTool`, `TransformSupport`, `Transformers`, `EditOps` | selection/transform tools and edit operations |
@@ -113,6 +125,8 @@ same id again replaces (panels, tools, actions, asset tabs, layers).
| `LevelTemplate` | `fill(Scene)` adds nodes directly (no undo) before the editor shows the new level |
| `LevelCheck` | adds `Problem.error/warning/info(msg, node)`; errors block Build/Play |
| `Icons` | vector icons by name; `Icons.register(name, painter)` for your own (16×16 Java2D); `Icons.swatch(colour, w, h)` |
| `NodeNames` | `NodeNames.name(node)` (one node) or `NodeNames.of(scene)` (index for many: `nameOf`, `objectName`, `waypointName`, `chainStarts`) – use it instead of `Node.label()` in UI texts; tooltips may show `node.id()` |
| `WrapLayout` | public `FlowLayout` that grows to more rows in a narrow container (inspector button rows: `ParamsSection.compact` switches a FlowLayout bar to it) |
| `Widgets`, `util.SwingListeners` | `Widgets.button(text, icon, tip, run)`, `Widgets.listCell(c, list, selected)`, `Widgets.wrappingLabel(html)` (help text that wraps at the dock width – use it instead of `<body style='width:…'>`); `onTextChange`, `onMenuOpen` |
| `ErrorDialog` | `ctx.error(title, t)` uses it: plain sentence (`ErrorDialog.plain(t)`, no exception class names) + collapsible **Details** (stack trace) |
| Game state | `ctx.setGameRunning(what, stop)` (default no-op): while a play-test game runs the status bar shows "Game running: what" and the toolbar Play button becomes **Stop game** (runs `stop`); `null` resets. `PlaytestRunner` sets it on launch and clears it when its watcher sees the game exit |