Reset/apply buttons only for real deviations, collapsible hierarchy tree
- Inspector rows compute their reset/apply entries through providers, so an entry that would not change anything is dropped; a single remaining entry renders as a direct button instead of a menu, none removes it entirely. - Bold and buttons now follow the same rule (deviatesFromAsset / deviatesFromTemplate in core/properties/resolve.ts). - Hierarchy panel is a collapsible tree: chevrons, arrow keys, double click, expand/collapse all. Everything starts collapsed; selecting an object expands its ancestors and scrolls it into view. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
76aa441dce
commit
2511483a67
13 files changed
+459
-57
No files matched your search
@@ -18,9 +18,9 @@ Live: <https://nockal.com/game-maker/> · Widget playground: <https://nockal.com
|
||||
| **Selection** | One or more scene objects. Click selects, `Ctrl`-click adds/removes, dragging on empty scene space draws a rubber band (objects whose position lies inside are selected). Dragging a selected object moves the whole selection; `Delete` removes it; the inspector offers **Create container** and **Remove from scene** for several objects. |
|
||||
| **Behavior** | Logic as an asset: a **node graph** plus the **variables** it declares. Placed like anything else (a diamond symbol in the scene); its parent is the **owner** the graph acts on. |
|
||||
| **Collider** | A shape (box or circle) for collision detection, placed as a **child** of the object it belongs to (its *body*). Drawn as a green outline in edit mode only. |
|
||||
| **Override** | A per-object value that replaces the asset's value for one property. Only changed keys are stored; the inspector marks them bold and offers a reset (↺) and an **apply** (↑) that writes the value into the asset instead. |
|
||||
| **Override** | A per-object value that replaces the asset's value for one property. Only changed keys are stored; the inspector marks them bold and offers a reset (↺) and an **apply** (↑) that writes the value into the asset instead. Both appear only where the value really differs from its base – an override carrying the asset's own value is none. |
|
||||
| **Default** | Every property has a schema default. Asset values that differ from it are marked bold in the inspector and can be reset (↺) the same way an override can. |
|
||||
| **Instance** | An object that is part of a placed container. Its base is the **template**, not just the asset: position and overrides that differ from the template are bold, ↺ reverts to the template, ↑ ▾ offers **Apply to container** (template; copies still at the old value follow, copies changed on their own keep theirs) or **Apply to asset**. Position rows apply to the container directly. |
|
||||
| **Instance** | An object that is part of a placed container. It has two bases: the **template** it was instantiated from and the asset behind it. A row lists only the bases its value really differs from – ↺ ▾ offers **Reset to container** (template value) and/or **Reset to asset** (drop the override – the template is only read when the container is placed, never at draw time), ↑ ▾ **Apply to container** (template; copies still at the old value follow, copies changed on their own keep theirs) and/or **Apply to asset**. With one base left the menu collapses to a plain ↺ / ↑, with none the buttons disappear. Bold marks the same thing the buttons offer. Position rows compare against the template only. Right after *Create container* an instance matches its template (the overrides were copied into it) but may still override the asset – then only the asset entry shows. |
|
||||
| **Edit mode** | The Scene tab draws the project model; panels, grid, gizmos and drag-to-move are active. |
|
||||
| **Play mode** | The editor switches to a **runtime copy** of the project (same ids). A `World` is instantiated from its active scene (one entity per scene object, resolved properties as mutable state) and shown in the **Game** tab. Systems tick it and mirror their changes into the copy; every panel stays open and edits the copy, which the world picks up immediately. **Stop discards world and copy** – the saved model is never touched. |
|
||||
|
||||
@@ -108,7 +108,12 @@ parent and are removed with it (also when the parent's asset is deleted); undo b
|
||||
subtree back. Re-parenting keeps the world position by recomputing the local one, and cycles
|
||||
are rejected. In the **Scene objects** panel children are indented below their parent; drag a
|
||||
row onto another row to parent it, onto the empty space below the rows (or right-click →
|
||||
Unparent) to move it to the top level; the inspector offers the same as a **Parent** menu. In
|
||||
Unparent) to move it to the top level; the inspector offers the same as a **Parent** menu.
|
||||
Rows with children **fold**: click the chevron (or press ←/→, or double-click the row) to open
|
||||
and close a subtree, right-click → **Expand all** / **Collapse all** for the whole scene. A
|
||||
scene opens fully collapsed – which rows are open is view state of the panel, never stored in
|
||||
the project – and selecting an object anywhere (viewport, `Add collider`, `Create container`)
|
||||
unfolds the way down to it and scrolls it into view, so a selection is never hidden. In
|
||||
play mode entities carry the same `parent` link: moving a parent entity moves its subtree,
|
||||
`Destroy` removes it. `Get position` exposes both the local and the world coordinates.
|
||||
|
||||
|
||||
Reference in new issue
Block a user