From 398d3b4dd9355883e6fc7659d2297cc1861e4676 Mon Sep 17 00:00:00 2001 From: Calic Date: Mon, 1 Jun 2026 20:10:32 +0200 Subject: [PATCH] chore(map-editor): bump to v0.3.0; cheatsheet + README sync Updates the in-editor Cheatsheet to reflect the new G binding and the Esc cascade; bumps manifest.module and the file header to v0.3.0; adds a Menu UI section to README.md. Co-Authored-By: Claude Opus 4.7 (1M context) --- README.md | 18 ++++++++++++++++++ init.lua | 23 ++++++++++++----------- manifest.module | 2 +- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index ff218f8..b3eb61a 100644 --- a/README.md +++ b/README.md @@ -113,3 +113,21 @@ SPOREL_CI=1 ./Sporel.exe --module=map-editor # exits with rc=0 after ~0.5 s - Design paper: `docs/design/2026-05-28-autotile-blob-styles-design.md` §11 in `sporel-meta` - Plan: `docs/superpowers/plans/2026-05-28-map-editor-blob-v2.md` + +## Menu UI (v0.3.0) + +Top toolbar replaced with a seven-category menu bar (File, Edit, View, +Map, Tools, Window, Help) plus a sticky two-segment Mode-pill on the +right end. Item types: action, modal, toggle, submenu, separator; +items can be conditionally disabled. A single-stack modal framework +hosts the existing Cheatsheet (I) and three new modals: Save As, Map +Properties (read-only), About. The Esc key cascades modal -> menu -> +quit. + +New Map and Open Map appear in the File menu as disabled placeholders +pending a v3-aware maps.create and an engine.asset.list_dir in a +future engine + lib slice. + +All previous hotkeys (Tab, S, E, R, H, 0, D, G, I, Esc) continue to +work; their bindings are documented in the items where applicable +and in the in-editor Cheatsheet modal. diff --git a/init.lua b/init.lua index c0c55b2..949d096 100644 --- a/init.lua +++ b/init.lua @@ -1,4 +1,4 @@ --- sporel-module-map-editor v0.2.0c.4 +-- sporel-module-map-editor v0.3.0 -- Interactive map editor — Rev 4 UX architecture (see design paper -- 2026-05-28-autotile-blob-styles-design.md §11 + plan stub -- 2026-05-28-map-editor-blob-v2.md). 0.2.0b adds the bottom palette @@ -591,19 +591,20 @@ local ui = (function() { key="I", action="Show / hide this cheatsheet" }, { key="S", action="Save current map to work.map.json" }, { key="E", action="Erase tile at mouse cell" }, - { key="R", action="Cycle tile rotation 0->90->180->270 (Direct-mode override)" }, - { key="H", action="Toggle tile flip 0<->1 (Direct-mode override)" }, + { key="R", action="Cycle tile rotation 0->90->180->270 (Direct only)" }, + { key="H", action="Toggle tile flip 0<->1 (Direct only)" }, { key="0", action="Reset transform (rot=0, flip=0)" }, { key="D", action="Toggle debug overlay (per-cell slot/rot labels)" }, - { key="G", action="Toggle world overlay (Auto-Tile: map-grid + dots; Direct: cell-grid)" }, - { key="Esc", action="Quit editor" }, - { key="LMB-drag canvas (Auto-Tile)", action="Stroke-paint vertices (any-corner fill)" }, - { key="RMB-drag canvas (Auto-Tile)", action="Stroke-clear vertices" }, + { key="G", action="Toggle world overlay" }, + { key="Esc", action="Close modal / close menu / quit" }, + { key="LMB on menu category", action="Open dropdown" }, + { key="LMB-drag canvas (Auto-Tile)", action="Stroke-paint map-tiles (any-corner fill)" }, + { key="RMB-drag canvas (Auto-Tile)", action="Stroke-clear map-tiles" }, { key="LMB-drag canvas (Direct)", action="Stroke-paint cells (override with slot+rot+flip)" }, { key="RMB-drag canvas (Direct)", action="Stroke-clear overrides" }, - { key="LMB on palette swatch", action="Select slot (1-14) as active tile" }, - { key="RMB on Layer row", action="Toggle layer visibility" }, - { key="LMB on Layer row", action="Set as active layer" }, + { key="LMB on palette swatch", action="Select slot (1-14) as active tile" }, + { key="RMB on Layer row", action="Toggle layer visibility" }, + { key="LMB on Layer row", action="Set as active layer" }, } -- ===================================================================== @@ -1455,7 +1456,7 @@ input.bind("reset_transform", { "0" }) -- 0.2.0c input.bind("toggle_debug_overlay", { "d" }) -- 0.2.0c.3 input.bind("toggle_world_overlay", { "g" }) -- 0.2.0c.4 -engine.print("map-editor v0.2.0c.4: ready. Tab=mode, I=help, G=grid, D=debug, S=save, E=erase, R=rotate, H=flip, 0=reset, ESC=quit") +engine.print("map-editor v0.3.0: ready. Tab=mode, I=help, G=grid, D=debug, S=save, E=erase, R=rotate, H=flip, 0=reset, ESC=quit / close") -- ===================================================================== -- Frame hooks diff --git a/manifest.module b/manifest.module index 7ac9453..1b80c6c 100644 --- a/manifest.module +++ b/manifest.module @@ -1,6 +1,6 @@ { "id": "map-editor", - "version": "0.2.0c.4", + "version": "0.3.0", "kind": "module", "api": "^0.1", "ci_frames": 30,