From 4c59e3820ba5ca29c69494981cd68f2945043ae7 Mon Sep 17 00:00:00 2001 From: SunSung-W541-2025 Date: Sun, 15 Feb 2026 09:24:42 +0100 Subject: [PATCH 01/19] edit/ui/all-menu [1.2.5-edit-ui-all-menu.0] begin --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6cdb4d4..27e0fbc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "fantasy-maphub", "name_full": "Fantasy MapHub Generators", - "version": "1.2.4", + "version": "1.2.5-edit-ui-all-menu.0", "description": "An offline-first hub that bundles several Watabou map generators into one consistent web app: same UI patterns, local assets, and modern import/export. It adds OpenAPI docs, proto-first serialization (including pure protobuf files), and a PWA build so everything works without an internet connection.", "license": "MPL-2.0", "author": "mail@sunsung.fun", From 77e1935049c69cb03f84735698e6d2383ade9a77 Mon Sep 17 00:00:00 2001 From: SunSung-W541-2025 Date: Sun, 15 Feb 2026 09:59:38 +0100 Subject: [PATCH 02/19] =?UTF-8?q?edit/ui/all-menu=20[1.2.5-edit-ui-all-men?= =?UTF-8?q?u.0]=20=20=D1=87=D0=B5=D1=88=D1=83=20=D0=BC=D0=B5=D0=BD=D1=8E?= =?UTF-8?q?=20-=203=D0=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/ToyTown2.js | 75 +++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/src/js/ToyTown2.js b/src/js/ToyTown2.js index ec7fa0e..3b8a77f 100644 --- a/src/js/ToyTown2.js +++ b/src/js/ToyTown2.js @@ -19062,45 +19062,46 @@ if (params !== null) (function (S, u) { this.tapOK && !isLockedMap && this.loadSample() }, onContext: function (a) { - var b = this; - a = new td; - var c = new td; - c.addItem("Ground", function () { - b.groundView(!1) - }); - c.addItem("Default", function () { - b.defaultView(!0) - }); - c.addItem("Map", p(this, this.mapView)); - c.addItem("Macro", p(this, this.macroView)); - var d = new td; - d.addItem("Rotation", function () { - b.setMode(b.navMode == b.modeRotate ? b.modeFree : b.modeRotate) - }, this.navMode == this.modeRotate); - d.addItem("Fly-through", - function () { - b.setMode(b.navMode == b.modeFly ? b.modeFree : b.modeFly) - }, this.navMode == this.modeFly); - a.addItem(isLockedMap ? "Return to 2D" : "New view", p(this, isLockedMap ? this.returnTo2D : this.loadSample)); - a.addItem("Import...", p(this, isLockedMap ? null : this.loadExternal)); - a.addItem("Export as OBJ", p(this, this.export)); - a.addSeparator(); - a.addSubmenu("View", c); - a.addSubmenu("Animation", d); + var contextThis = this, rootMenu = new td; - a.addSeparator(); - a.addItem("Shuffle styles", p(this, this.toggleShuffleStyle), Va.shuffleStyles); - a.addItem("Trees", p(this, this.toggleTrees), Ka.showTrees); - a.addItem("Gable roofs", p(this, this.toggleGableRoofs), Ka.gableRoofs); - a.addItem("Windows", p(this, this.toggleWindows), Ka.showWindows); - a.addItem("Style...", p(this, this.showStyle)); + // BEGIN // - a.addSeparator(); - a.addItem("Fullscreen", p(this, this.toggleFullscreen), 2 != this.stage.get_displayState()); - a.addItem("About", function () { - null == Ma.findForm(AboutDialogForm) && Ma.showDialog(new AboutDialogForm) - }); - Ma.showMenu(a) + rootMenu.addItem(isLockedMap ? "Return to 2D" : "New view", p(this, isLockedMap ? this.returnTo2D : this.loadSample)); + rootMenu.addItem("Import...", p(this, isLockedMap ? null : this.loadExternal)); + rootMenu.addItem("Export as OBJ", p(this, this.export)); + rootMenu.addSeparator(); + + // ###################### // + + var viewMenu = new td; + viewMenu.addItem("Default", function () {contextThis.defaultView(!0); contextThis.typeView = "";}, contextThis.typeView === "" && contextThis.typeView === null); + viewMenu.addItem("Ground", function () {contextThis.groundView(!1); contextThis.typeView = "ground";}, contextThis.typeView === "ground"); + viewMenu.addItem("Map", function () {p(contextThis, contextThis.mapView); contextThis.typeView = "map";}, contextThis.typeView === "map"); + viewMenu.addItem("Macro", function () {p(contextThis, contextThis.macroView); contextThis.typeView = "macro";}, contextThis.typeView === "macro"); + rootMenu.addSubmenu("View", viewMenu); + + var displayMenu = new td; + displayMenu.addItem("Shuffle styles", p(this, this.toggleShuffleStyle), Va.shuffleStyles); + displayMenu.addItem("Trees", p(this, this.toggleTrees), Ka.showTrees); + displayMenu.addItem("Gable roofs", p(this, this.toggleGableRoofs), Ka.gableRoofs); + displayMenu.addItem("Windows", p(this, this.toggleWindows), Ka.showWindows); + rootMenu.addSubmenu("Display", displayMenu); + + var animationMenu = new td; + animationMenu.addItem("Rotation", function () {contextThis.setMode(contextThis.navMode == contextThis.modeRotate ? contextThis.modeFree : contextThis.modeRotate)}, contextThis.navMode == contextThis.modeRotate); + animationMenu.addItem("Fly-through", function () {contextThis.setMode(contextThis.navMode == contextThis.modeFly ? contextThis.modeFree : contextThis.modeFly)}, contextThis.navMode == contextThis.modeFly); + rootMenu.addSubmenu("Animation", animationMenu); + + rootMenu.addItem("Style...", p(this, this.showStyle)); + rootMenu.addSeparator(); + + // ###################### // + + rootMenu.addItem("Fullscreen", p(this, this.toggleFullscreen), 2 != this.stage.get_displayState()); + rootMenu.addItem("About", function () {null == Ma.findForm(AboutDialogForm) && Ma.showDialog(new AboutDialogForm)}); + Ma.showMenu(rootMenu) + + // END // }, switchStyle: function (a) { aa.setPalette(a, !0); From 01f7aba3ccb3fbe920762f22000e593f4104e8c8 Mon Sep 17 00:00:00 2001 From: SunSung-W541-2025 Date: Sun, 15 Feb 2026 10:08:10 +0100 Subject: [PATCH 03/19] =?UTF-8?q?edit/ui/all-menu=20[1.2.5-edit-ui-all-men?= =?UTF-8?q?u.0]=20=20=D0=B7=D0=B0=D0=BA=D0=BE=D0=BD=D1=87=D0=B8=D0=BB=20?= =?UTF-8?q?=D1=81=203=D0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/ToyTown2.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/js/ToyTown2.js b/src/js/ToyTown2.js index 3b8a77f..e13bf9f 100644 --- a/src/js/ToyTown2.js +++ b/src/js/ToyTown2.js @@ -19063,6 +19063,7 @@ if (params !== null) (function (S, u) { }, onContext: function (a) { var contextThis = this, rootMenu = new td; + if(typeof contextThis.typeView === "undefined") contextThis.typeView = "default"; // BEGIN // @@ -19074,12 +19075,17 @@ if (params !== null) (function (S, u) { // ###################### // var viewMenu = new td; - viewMenu.addItem("Default", function () {contextThis.defaultView(!0); contextThis.typeView = "";}, contextThis.typeView === "" && contextThis.typeView === null); + viewMenu.addItem("Default", function () {contextThis.defaultView(!0); contextThis.typeView = "default";}, contextThis.typeView === "default"); viewMenu.addItem("Ground", function () {contextThis.groundView(!1); contextThis.typeView = "ground";}, contextThis.typeView === "ground"); - viewMenu.addItem("Map", function () {p(contextThis, contextThis.mapView); contextThis.typeView = "map";}, contextThis.typeView === "map"); - viewMenu.addItem("Macro", function () {p(contextThis, contextThis.macroView); contextThis.typeView = "macro";}, contextThis.typeView === "macro"); + viewMenu.addItem("Map", function () {contextThis.mapView(); contextThis.typeView = "map";}, contextThis.typeView === "map"); + viewMenu.addItem("Macro", function () {contextThis.macroView(); contextThis.typeView = "macro";}, contextThis.typeView === "macro"); rootMenu.addSubmenu("View", viewMenu); + var animationMenu = new td; + animationMenu.addItem("Rotation", function () {contextThis.setMode(contextThis.navMode == contextThis.modeRotate ? contextThis.modeFree : contextThis.modeRotate)}, contextThis.navMode == contextThis.modeRotate); + animationMenu.addItem("Fly-through", function () {contextThis.setMode(contextThis.navMode == contextThis.modeFly ? contextThis.modeFree : contextThis.modeFly)}, contextThis.navMode == contextThis.modeFly); + rootMenu.addSubmenu("Animation", animationMenu); + var displayMenu = new td; displayMenu.addItem("Shuffle styles", p(this, this.toggleShuffleStyle), Va.shuffleStyles); displayMenu.addItem("Trees", p(this, this.toggleTrees), Ka.showTrees); @@ -19087,11 +19093,6 @@ if (params !== null) (function (S, u) { displayMenu.addItem("Windows", p(this, this.toggleWindows), Ka.showWindows); rootMenu.addSubmenu("Display", displayMenu); - var animationMenu = new td; - animationMenu.addItem("Rotation", function () {contextThis.setMode(contextThis.navMode == contextThis.modeRotate ? contextThis.modeFree : contextThis.modeRotate)}, contextThis.navMode == contextThis.modeRotate); - animationMenu.addItem("Fly-through", function () {contextThis.setMode(contextThis.navMode == contextThis.modeFly ? contextThis.modeFree : contextThis.modeFly)}, contextThis.navMode == contextThis.modeFly); - rootMenu.addSubmenu("Animation", animationMenu); - rootMenu.addItem("Style...", p(this, this.showStyle)); rootMenu.addSeparator(); From 3435b2bd4aa0c863b0aad3793534518f9eb29079 Mon Sep 17 00:00:00 2001 From: SunSung-W541-2025 Date: Sun, 15 Feb 2026 10:51:00 +0100 Subject: [PATCH 04/19] =?UTF-8?q?edit/ui/all-menu=20[1.2.5-edit-ui-all-men?= =?UTF-8?q?u.0]=20=20=D1=87=D0=B5=D1=88=D1=83=20=D0=BC=D0=B5=D0=BD=D1=8E?= =?UTF-8?q?=20=D1=81=D0=B5=D0=BB=D0=B0=20-=20=D0=BF=D1=80=D0=BE=D1=86?= =?UTF-8?q?=D0=B5=D1=81=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/Village.js | 125 +++++++++++++++++++++++++--------------------- 1 file changed, 67 insertions(+), 58 deletions(-) diff --git a/src/js/Village.js b/src/js/Village.js index 2b45a3e..26f48d6 100644 --- a/src/js/Village.js +++ b/src/js/Village.js @@ -16128,70 +16128,79 @@ var $lime_init = function (E, u) { this.stage.set_displayState(2 == this.stage.get_displayState() ? 1 : 2) }, showContextMenu: function () { - var a = this, - b = new Qc, - c = function (c, d) { - b.addItem(c, function () { - a.setTrees(d) - }, - oc.defaultMode == d) - }; - c("None", oc.MODE_NONE); - c("Some", oc.MODE_SOME); - c("Many", oc.MODE_MANY); - b.addSeparator(); - b.addItem("Reroll", r(this, this.rerollTrees)); - b.addSeparator(); - b.addItem("Shading", r(this, this.shadeTrees), hb.get("shade_trees", !0)); - c = new Qc; - c.addItem("Relief", r(this, this.toggleRelief), na.showRelief); - c.addItem("Fields", r(this, this.toggleFields), na.showFields); - c.addItem("Shading", r(this, this.toggleShading), na.showShading); - c.addItem("Orchards", r(this, this.toggleOrchards), na.showOrchards); - c.addItem("Shadows", r(this, this.toggleShadows), na.showShadows); - c.addItem("Buildings", r(this, this.toggleWilderness), na.showBuildings); - c.addItem("Roads", r(this, this.toggleRoads), na.showRoads); - c.addItem("Driveways", na.showBuildings ? r(this, this.toggleDriveways) : null, na.showDriveways); - c.addItem("Title", r(this, this.toggleTitle), na.showTitle); - c.addItem("Spotlight...", r(this, this.editDramatic)); - c.addSubmenu("Trees", b); - var d = new Qc; - d.addItem("PNG", (G = this.view, r(G, G.exportPNG))); - d.addItem("SVG", (G = this.view, r(G, G.exportSVG))); - d.addItem("JSON", function () {Hh.export(a.village)}); - d.addItem("PROTO", function () {Hh.exportBinary(a.village)}); - var f = new Qc, + var contextThis = this; + var rootMenu = new Qc, h = this.view; + h = this.village.findBuilding(new I(h.map.get_mouseX(), h.map.get_mouseY())); if (null != h) { - f.addItem("Open in Dwellings", r(h, h.open)); + rootMenu.addItem("Open in Dwellings", r(h, h.open)); var k = this.village.buildings.indexOf(h); - -1 != this.village.bp.numbered.indexOf(k) ? (f.addItem("Unmark", function () { - a.unmark(k) - }), f.addItem("Unmark all", r(this, this.unmarkAll))) : (f.addItem("Mark", function () { - a.mark(k) - }), f.addItem("Mark all", r(this, this.markAll))); - f.addSeparator() - } - f.addItem("New village", r(this, this.newVillage)); - f.addItem("Reroll village", r(this, this.rerollVillage)); - f.addItem("Rename village...", r(this, this.rename)); - f.addItem("View in 3D", r(this, this.onViewIn3D)); - f.addItem("Import...", r(this, this.onImport)); - f.addSubmenu("Export as", d); - f.addItem("Permalink...", r(this, this.showURL)); + -1 != this.village.bp.numbered.indexOf(k) ? (rootMenu.addItem("Unmark", function () { + contextThis.unmark(k) + }), rootMenu.addItem("Unmark all", r(this, this.unmarkAll))) : (rootMenu.addItem("Mark", function () { + contextThis.mark(k) + }), rootMenu.addItem("Mark all", r(this, this.markAll))); + rootMenu.addSeparator() + } - f.addSeparator(); - f.addItem("Parameters...", r(this, this.configure)); - f.addSubmenu("Layers", c); - f.addItem("Style...", r(this, this.editStyle)); + // BEGIN // + + rootMenu.addItem("New village", r(this, this.newVillage)); + rootMenu.addItem("View in 3D", r(this, this.onViewIn3D)); + rootMenu.addItem("Import...", r(this, this.onImport)); + + var exportMenu = new Qc; + exportMenu.addItem("PNG", (G = this.view, r(G, G.exportPNG))); + exportMenu.addItem("SVG", (G = this.view, r(G, G.exportSVG))); + exportMenu.addItem("JSON", function () {Hh.export(contextThis.village)}); + exportMenu.addItem("PROTO", function () {Hh.exportBinary(contextThis.village)}); + rootMenu.addSubmenu("Export as", exportMenu); + + rootMenu.addItem("Permalink...", r(this, this.showURL)); + rootMenu.addSeparator(); + + // ###################### // + + rootMenu.addItem("Reroll village", r(this, this.rerollVillage)); + rootMenu.addItem("Rename village...", r(this, this.rename)); + rootMenu.addItem("Parameters...", r(this, this.configure)); + + var layersMenu = new Qc; + layersMenu.addItem("Relief", r(this, this.toggleRelief), na.showRelief); + layersMenu.addItem("Fields", r(this, this.toggleFields), na.showFields); + layersMenu.addItem("Shading", r(this, this.toggleShading), na.showShading); + layersMenu.addItem("Orchards", r(this, this.toggleOrchards), na.showOrchards); + layersMenu.addItem("Shadows", r(this, this.toggleShadows), na.showShadows); + layersMenu.addItem("Buildings", r(this, this.toggleWilderness), na.showBuildings); + layersMenu.addItem("Roads", r(this, this.toggleRoads), na.showRoads); + layersMenu.addItem("Driveways", na.showBuildings ? r(this, this.toggleDriveways) : null, na.showDriveways); + layersMenu.addItem("Title", r(this, this.toggleTitle), na.showTitle); + layersMenu.addItem("Spotlight...", r(this, this.editDramatic)); + + var treeMenu = new Qc; + treeMenu.addItem("None", function () {contextThis.setTrees(oc.MODE_NONE);}, oc.defaultMode == oc.MODE_NONE); + treeMenu.addItem("Some", function () {contextThis.setTrees(oc.MODE_SOME);}, oc.defaultMode == oc.MODE_SOME); + treeMenu.addItem("Many", function () {contextThis.setTrees(oc.MODE_MANY);}, oc.defaultMode == oc.MODE_MANY); + treeMenu.addSeparator(); + treeMenu.addItem("Reroll", r(this, this.rerollTrees)); + treeMenu.addSeparator(); + treeMenu.addItem("Shading", r(this, this.shadeTrees), hb.get("shade_trees", !0)); + layersMenu.addSubmenu("Trees", treeMenu); + + rootMenu.addSubmenu("Layers", layersMenu); + + rootMenu.addItem("Style...", r(this, this.editStyle)); + rootMenu.addSeparator(); + + // ###################### // + + rootMenu.addItem("Fullscreen", r(this, this.toggleFullscreen), 2 != this.stage.get_displayState()); + rootMenu.addItem("About", function () {null == w.findForm(AboutDialogForm) && w.showDialog(new AboutDialogForm)}); + w.showMenu(rootMenu) + + // END // - f.addSeparator(); - f.addItem("Fullscreen", r(this, this.toggleFullscreen), 2 != this.stage.get_displayState()); - f.addItem("About", function () { - null == w.findForm(AboutDialogForm) && w.showDialog(new AboutDialogForm) - }); - w.showMenu(f) }, restoreVillage: function () { var a = jc.fromURL(); From 96cc5f223998c64eb5a4a717b0d414dc8bba74e4 Mon Sep 17 00:00:00 2001 From: SunSung-W541-2025 Date: Sun, 15 Feb 2026 10:56:47 +0100 Subject: [PATCH 05/19] =?UTF-8?q?edit/ui/all-menu=20[1.2.5-edit-ui-all-men?= =?UTF-8?q?u.0]=20=20=D1=87=D0=B5=D1=88=D1=83=20=D0=BC=D0=B5=D0=BD=D1=8E?= =?UTF-8?q?=20=D1=81=D0=B5=D0=BB=D0=B0=20-=20=D0=B7=D0=B0=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D1=87=D0=B8=D0=BB=20=D1=81=20=D0=BD=D0=B5=D0=B9=D0=BC?= =?UTF-8?q?=D1=81=D0=BF=D0=B5=D0=B9=D1=81=D0=BE=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/Village.js | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/js/Village.js b/src/js/Village.js index 26f48d6..fa3b9a4 100644 --- a/src/js/Village.js +++ b/src/js/Village.js @@ -16129,19 +16129,20 @@ var $lime_init = function (E, u) { }, showContextMenu: function () { var contextThis = this; - var rootMenu = new Qc, - h = this.view; + var rootMenu = new Qc; - h = this.village.findBuilding(new I(h.map.get_mouseX(), h.map.get_mouseY())); - if (null != h) { - rootMenu.addItem("Open in Dwellings", r(h, h.open)); - var k = this.village.buildings.indexOf(h); - -1 != this.village.bp.numbered.indexOf(k) ? (rootMenu.addItem("Unmark", function () { - contextThis.unmark(k) - }), rootMenu.addItem("Unmark all", r(this, this.unmarkAll))) : (rootMenu.addItem("Mark", function () { - contextThis.mark(k) - }), rootMenu.addItem("Mark all", r(this, this.markAll))); - rootMenu.addSeparator() + var posMouse = this.village.findBuilding(new I(contextThis.view.map.get_mouseX(), contextThis.view.map.get_mouseY())); + if (null != posMouse) { + rootMenu.addItem("Open in Dwellings", r(posMouse, posMouse.open)); + var buildObj = this.village.buildings.indexOf(posMouse); + if(-1 != this.village.bp.numbered.indexOf(buildObj)) { + rootMenu.addItem("Unmark", function () {contextThis.unmark(buildObj)}); + rootMenu.addItem("Unmark all", r(this, this.unmarkAll)); + }else{ + rootMenu.addItem("Mark", function () {contextThis.mark(buildObj)}); + rootMenu.addItem("Mark all", r(this, this.markAll)); + } + rootMenu.addSeparator(); } // BEGIN // From 5a91b7fe3fdc0a0cae9214398711cc8dc047a96f Mon Sep 17 00:00:00 2001 From: SunSung-W541-2025 Date: Sun, 15 Feb 2026 11:14:47 +0100 Subject: [PATCH 06/19] =?UTF-8?q?edit/ui/all-menu=20[1.2.5-edit-ui-all-men?= =?UTF-8?q?u.0]=20=20=D0=B4=D0=B5=D1=80=D0=B5=D0=B2=D0=BD=D1=8F=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=BA=D0=BE=D0=BD=D1=87=D0=B5=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/Village.js | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/js/Village.js b/src/js/Village.js index fa3b9a4..f29fb37 100644 --- a/src/js/Village.js +++ b/src/js/Village.js @@ -16163,34 +16163,35 @@ var $lime_init = function (E, u) { // ###################### // - rootMenu.addItem("Reroll village", r(this, this.rerollVillage)); - rootMenu.addItem("Rename village...", r(this, this.rename)); - rootMenu.addItem("Parameters...", r(this, this.configure)); + var rerollMenu = new Qc; + rerollMenu.addItem("Trees", r(this, this.rerollTrees)); + rerollMenu.addItem("Village", r(this, this.rerollVillage)); + rerollMenu.addItem("Others...", r(this, this.rename)); + rootMenu.addSubmenu("Reroll", rerollMenu); - var layersMenu = new Qc; - layersMenu.addItem("Relief", r(this, this.toggleRelief), na.showRelief); - layersMenu.addItem("Fields", r(this, this.toggleFields), na.showFields); - layersMenu.addItem("Shading", r(this, this.toggleShading), na.showShading); - layersMenu.addItem("Orchards", r(this, this.toggleOrchards), na.showOrchards); - layersMenu.addItem("Shadows", r(this, this.toggleShadows), na.showShadows); - layersMenu.addItem("Buildings", r(this, this.toggleWilderness), na.showBuildings); - layersMenu.addItem("Roads", r(this, this.toggleRoads), na.showRoads); - layersMenu.addItem("Driveways", na.showBuildings ? r(this, this.toggleDriveways) : null, na.showDriveways); - layersMenu.addItem("Title", r(this, this.toggleTitle), na.showTitle); - layersMenu.addItem("Spotlight...", r(this, this.editDramatic)); + var displayMenu = new Qc; + displayMenu.addItem("Relief", r(this, this.toggleRelief), na.showRelief); + displayMenu.addItem("Fields", r(this, this.toggleFields), na.showFields); + displayMenu.addItem("Shading", r(this, this.toggleShading), na.showShading); + displayMenu.addItem("Orchards", r(this, this.toggleOrchards), na.showOrchards); + displayMenu.addItem("Shadows", r(this, this.toggleShadows), na.showShadows); + displayMenu.addItem("Buildings", r(this, this.toggleWilderness), na.showBuildings); + displayMenu.addItem("Roads", r(this, this.toggleRoads), na.showRoads); + displayMenu.addItem("Driveways", na.showBuildings ? r(this, this.toggleDriveways) : null, na.showDriveways); + displayMenu.addItem("Title", r(this, this.toggleTitle), na.showTitle); + displayMenu.addItem("Spotlight...", r(this, this.editDramatic)); var treeMenu = new Qc; treeMenu.addItem("None", function () {contextThis.setTrees(oc.MODE_NONE);}, oc.defaultMode == oc.MODE_NONE); treeMenu.addItem("Some", function () {contextThis.setTrees(oc.MODE_SOME);}, oc.defaultMode == oc.MODE_SOME); treeMenu.addItem("Many", function () {contextThis.setTrees(oc.MODE_MANY);}, oc.defaultMode == oc.MODE_MANY); treeMenu.addSeparator(); - treeMenu.addItem("Reroll", r(this, this.rerollTrees)); - treeMenu.addSeparator(); treeMenu.addItem("Shading", r(this, this.shadeTrees), hb.get("shade_trees", !0)); - layersMenu.addSubmenu("Trees", treeMenu); + displayMenu.addSubmenu("Trees", treeMenu); - rootMenu.addSubmenu("Layers", layersMenu); + rootMenu.addSubmenu("Display", displayMenu); + rootMenu.addItem("Generator...", r(this, this.configure)); rootMenu.addItem("Style...", r(this, this.editStyle)); rootMenu.addSeparator(); From ec8466fc790c085afbc8dc94ae9acb9dc7e6b385 Mon Sep 17 00:00:00 2001 From: SunSung-W541-2025 Date: Sun, 15 Feb 2026 11:43:04 +0100 Subject: [PATCH 07/19] =?UTF-8?q?edit/ui/all-menu=20[1.2.5-edit-ui-all-men?= =?UTF-8?q?u.0]=20=20=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D0=BF=D0=B5=D1=89=D0=B5=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/Cave.js | 89 ++++++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 42 deletions(-) diff --git a/src/js/Cave.js b/src/js/Cave.js index 06430bb..d44213c 100644 --- a/src/js/Cave.js +++ b/src/js/Cave.js @@ -5799,53 +5799,58 @@ var $lime_init = function (A, r) { this.layout() }, showMenu: function (a) { - null == a && (a = !1); - var b = this, - c = new Yc, - d = function (a, d) { - c.addItem(a, function () { - b.view.setGridMode(d) - }).setCheck(Va.gridMode == d) - }; - d("Square", 1); - d("Hexagonal", 2); - d("Hidden", 0); - c.addSeparator(); - c.addItem("Customize...", 1 == Va.gridMode ? function () { - lb.customize(b.model) - } : null); - d = new Yc; - d.addItem("Narrow tunnels", l(this, this.toggleTunnels)).setCheck(la.narrowTunnels); - d.addItem("Geometry...", l(this, - this.showGeoForm)); - d.addItem("Water...", l(this, this.showWaterForm)); - var f = this.getViewMenu(), - h = new Yc; - h.addItem("PNG", l(this, this.exportPNG)); - h.addItem("SVG", l(this, this.exportSVG)); - var k = new Yc; - a && (k.addItem("Rename...", l(this, this.editName)), k.addItem("Reroll", l(this, this.rerollName)), k.addSeparator()); + var contextThis = this; + var rootMenu = new Yc; + a && (rootMenu.addItem("Rename...", l(this, this.editName)), rootMenu.addSeparator()); - k.addItem("New map", function () { - b.reset() - }); - k.addItem("Rotate...", l(this, this.showRotateForm)); - k.addItem("Tags...", l(this, this.showTagsForm)); - k.addSubmenu("Export as", h); - k.addItem("Permalink...", l(this, this.showURL)); + // BEGIN // + + rootMenu.addItem("New map", function () {contextThis.reset()}); + + var exportMenu = new Yc; + exportMenu.addItem("PNG", l(this, this.exportPNG)); + exportMenu.addItem("SVG", l(this, this.exportSVG)); + rootMenu.addSubmenu("Export as", exportMenu); + rootMenu.addItem("Permalink...", l(this, this.showURL)); + rootMenu.addSeparator(); + + // ###################### // + + rootMenu.addItem("Reroll name", l(this, this.rerollName)) - k.addSeparator(); - k.addSubmenu("Grid", c); - k.addSubmenu("Shape", d); - null != f && k.addSubmenu("Display", f); - k.addItem("Style...", l(this, this.showStyle)); + var editMenu = new Yc; + editMenu.addItem("Grid...", 1 == Va.gridMode ? function () {lb.customize(contextThis.model)} : null); + editMenu.addItem("Water...", l(this, this.showWaterForm)); + editMenu.addItem("Rotate...", l(this, this.showRotateForm)); + editMenu.addItem("Geometry...", l(this, this.showGeoForm)); + rootMenu.addSubmenu("Edit", editMenu); - k.addSeparator(); - k.addItem("Fullscreen", l(this, this.toggleFullscreen), 2 != this.stage.get_displayState()); - k.addItem("About", function () { + var gridMenu = new Yc; + gridMenu.addItem("Square", function () {contextThis.view.setGridMode(1)}).setCheck(Va.gridMode == 1); + gridMenu.addItem("Hexagonal", function () {contextThis.view.setGridMode(2)}).setCheck(Va.gridMode == 2); + gridMenu.addItem("Hidden", function () {contextThis.view.setGridMode(0)}).setCheck(Va.gridMode == 0); + rootMenu.addSubmenu("Grid", gridMenu); + + var displayMenu = this.getViewMenu(); + if(null != displayMenu ) { + displayMenu.addItem("Narrow tunnels", l(this, this.toggleTunnels)).setCheck(la.narrowTunnels); + rootMenu.addSubmenu("Display", displayMenu); + } + + rootMenu.addItem("Generator...", l(this, this.showTagsForm)); + rootMenu.addItem("Style...", l(this, this.showStyle)); + rootMenu.addSeparator(); + + // ###################### // + + rootMenu.addItem("Fullscreen", l(this, this.toggleFullscreen), 2 != this.stage.get_displayState()); + rootMenu.addItem("About", function () { null == Fa.findForm(AboutDialogForm) && Fa.showDialog(new AboutDialogForm) }); - Fa.showMenu(k) + Fa.showMenu(rootMenu); + + // END // + }, toggleFullscreen: function () { this.stage.set_displayState(2 == this.stage.get_displayState() ? 1 : 2) From 32b41d414d32aa9148c81f161cb59a32d01c9aca Mon Sep 17 00:00:00 2001 From: SunSung-W541-2025 Date: Sun, 15 Feb 2026 11:59:18 +0100 Subject: [PATCH 08/19] =?UTF-8?q?edit/ui/all-menu=20[1.2.5-edit-ui-all-men?= =?UTF-8?q?u.0]=20=20=D0=BD=D0=B0=D1=87=D0=B0=D0=BB=20=D1=81=20MFCG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/mfcg.js | 68 ++++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/src/js/mfcg.js b/src/js/mfcg.js index fcfbc6a..07e549a 100644 --- a/src/js/mfcg.js +++ b/src/js/mfcg.js @@ -14531,56 +14531,62 @@ var $lime_init = function (A, t) { a.set_position(b) }, onMapContext: function (a) { - var b = this; + var contextThis = this; a.addItem("Add landmark", l(this, this.addLandmark)); null != this.patch && this.patch.isRerollable() && (a.addItem("Reroll geometry", (G = this.patch, l(G, G.reroll))), this.patch.ward.onContext(a, this.mouse.x, this.mouse.y)); if (null == this.model.focus) { var c = this.patch; c = null != (null != c ? c.district : null) } else c = !1; - c && a.addItem("Zoom in", function () { - b.zoomIn(b.patch.district) - }) + c && a.addItem("Zoom in", function () {contextThis.zoomIn(contextThis.patch.district)}) }, - onContext: function (a) { - var b = this; - null != this.model.focus && (a.addItem("Zoom out", function () { - b.zoomIn(null) - }), - a.addSeparator()); - a.addItem("New city", l(this, this.buildNew)); - a.addItem("Warp", l(this, this.onWarp)); - a.addItem("Colors...", ia.editColors); + onContext: function (rootMenu) { + var contextThis = this; + + if(null != this.model.focus){ + rootMenu.addItem("Zoom out", function () {contextThis.zoomIn(null)}); + rootMenu.addSeparator(); + } + + // BEGIN // + + rootMenu.addItem("New city", l(this, this.buildNew)); + rootMenu.addItem("Warp", l(this, this.onWarp)); + rootMenu.addItem("Colors...", ia.editColors); var c = new dd; c.addItem("PNG", be.asPNG); c.addItem("SVG", be.asSVG); c.addItem("JSON", be.asJSON); c.addItem("PROTO", be.asPROTO); - a.addItem("View in 3D", l(this, this.onViewIn3D)); - a.addItem("Import...", l(this, this.onImport)); - a.addSubmenu("Export as", c); - a.addItem("Permalink..", !this.permalinkDisabled ? l(this, this.onPermalink) : null) + rootMenu.addItem("View in 3D", l(this, this.onViewIn3D)); + rootMenu.addItem("Import...", l(this, this.onImport)); + rootMenu.addSubmenu("Export as", c); + rootMenu.addItem("Permalink..", !this.permalinkDisabled ? l(this, this.onPermalink) : null) + rootMenu.addSeparator(); + + // ###################### // - a.addSeparator(); c = function (c, f) { - a.addItem(c, function () { - b.toggleWindow(f) - }, null != u.findWidnow(f)) + rootMenu.addItem(c, function () {contextThis.toggleWindow(f)}, null != u.findWidnow(f)); }; + + rootMenu.addItem("Reroll all", function () {Ub.rerollDistricts();}) + c("Generate", Kd); c("Settlement", rg); c("Style...", ke); + rootMenu.addSeparator(); - a.addSeparator(); - a.addItem("Fullscreen", l(this, this.toggleFullscreen), this.stage.window.__fullscreen); - a.addItem("About", function () { - null == u.findWidnow(AboutDialogForm) && u.showDialog(new AboutDialogForm) - }); + // ###################### // + + rootMenu.addItem("Fullscreen", l(this, this.toggleFullscreen), this.stage.window.__fullscreen); + rootMenu.addItem("About", function () {null == u.findWidnow(AboutDialogForm) && u.showDialog(new AboutDialogForm)}); + + // END // }, toggleWindow: function (a) { - var b = - u.findWidnow(a); + var b = u.findWidnow(a); null == b ? (a = w.createInstance(a, []), u.showDialog(a), a instanceof vc && va.__cast(a, vc).restore()) : b.hide() }, addLandmark: function () { @@ -17057,10 +17063,7 @@ var $lime_init = function (A, t) { context: function (a, b) { var c = this, d = ia.getMenu(); - d.addItem("Edit name", function () { - c.edit(a, b) - }); - d.addItem("Reroll all", (G = this.model, l(G, G.rerollDistricts))) + d.addItem("Edit name", function () {c.edit(a, b)}); }, exportPNG: function (a) { if (a){ @@ -17442,7 +17445,6 @@ var $lime_init = function (A, t) { h[0].context.add(function (c) { return function () { b.addItem("Edit name", c[0]); - b.addItem("Reroll all", l(a, a.rerollDistricts)) } }(p)) } From bae2640f052b33c7467e21cae5ffae3fd526a27b Mon Sep 17 00:00:00 2001 From: SunSung-W541-2025 Date: Sun, 15 Feb 2026 12:27:23 +0100 Subject: [PATCH 09/19] =?UTF-8?q?edit/ui/all-menu=20[1.2.5-edit-ui-all-men?= =?UTF-8?q?u.0]=20=20=D0=BA=D0=BE=D0=B2=D1=8B=D1=80=D0=BD=D1=83=D0=BB=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BD=D1=82=D0=B5=D0=BA=D1=81=D1=82=D1=8B=20=D0=BD?= =?UTF-8?q?=D0=B0=20=D1=80=D0=B0=D0=B7=D0=BD=D1=8B=D1=85=20=D0=B5=D0=BB?= =?UTF-8?q?=D0=B5=D0=BC=D0=B5=D0=BD=D1=82=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/mfcg.js | 96 +++++++++++++++++++++----------------------------- 1 file changed, 40 insertions(+), 56 deletions(-) diff --git a/src/js/mfcg.js b/src/js/mfcg.js index 07e549a..7d98a84 100644 --- a/src/js/mfcg.js +++ b/src/js/mfcg.js @@ -14552,7 +14552,7 @@ var $lime_init = function (A, t) { rootMenu.addItem("New city", l(this, this.buildNew)); rootMenu.addItem("Warp", l(this, this.onWarp)); - rootMenu.addItem("Colors...", ia.editColors); + var c = new dd; c.addItem("PNG", be.asPNG); c.addItem("SVG", be.asSVG); @@ -14571,11 +14571,20 @@ var $lime_init = function (A, t) { rootMenu.addItem(c, function () {contextThis.toggleWindow(f)}, null != u.findWidnow(f)); }; - rootMenu.addItem("Reroll all", function () {Ub.rerollDistricts();}) + rootMenu.addItem("Reroll all", function () { + var model = contextThis.model || Ub.instance; + null != model && model.rerollDistricts(); + }) + + rootMenu.addItem("Reroll title", function () { + var model = contextThis.model || Ub.instance; + null != model && model.setName(model.rerollName()); + }) c("Generate", Kd); c("Settlement", rg); - c("Style...", ke); + c("Display...", ke); + rootMenu.addItem("Style...", ia.editColors); rootMenu.addSeparator(); // ###################### // @@ -17276,34 +17285,20 @@ var $lime_init = function (A, t) { this.legend.relayout() }, onContext: function (a) { - var b = - this, + var b = this, c = ia.getMenu(); - a = function (a, f) { - c.addItem(a, function () { - Db.set_current(f); - b.scalebar.update(); - b.update(); - b.legend.relayout() - }, Db.get_current() == f) - }; - a("Metric units", Db.metric); - a("Imperial units", Db.imperial); - a = function (a, f) { - c.addItem(a, function () { - Lb.sbClass = f; - b.removeChild(b.scalebar); - b.scalebar = Lb.create(!0); - b.addChild(b.scalebar); - b.update(); - b.legend.relayout() - }, Lb.sbClass == f) - }; - a("Default style", of); - a("Alternative style", vg); - c.addItem("Hide", function () { - ba.set("scale_bar", !1) - }) + + var unitMain = new dd; + unitMain.addItem("Metric", function () {Db.set_current(Db.metric);b.scalebar.update();b.update();b.legend.relayout()}, Db.get_current() == Db.metric) + unitMain.addItem("Imperial", function () {Db.set_current(Db.imperial);b.scalebar.update();b.update();b.legend.relayout()}, Db.get_current() == Db.imperial) + c.addSubmenu("Unit", unitMain); + + var styleMain = new dd; + styleMain.addItem("Default", function () {Lb.sbClass = of;b.removeChild(b.scalebar);b.scalebar = Lb.create(!0);b.addChild(b.scalebar);b.update();b.legend.relayout()}, Lb.sbClass == of); + styleMain.addItem("Alternative", function () {Lb.sbClass = vg;b.removeChild(b.scalebar);b.scalebar = Lb.create(!0);b.addChild(b.scalebar);b.update();b.legend.relayout()}, Lb.sbClass == vg); + c.addSubmenu("Style", styleMain); + + c.addItem("Hide", function () {ba.set("scale_bar", !1)}); }, __class__: oh }); @@ -17906,26 +17901,19 @@ var $lime_init = function (A, t) { ni.__super__ = Ca; ni.prototype = v(Ca.prototype, { onContext: function (a) { - var b = this, - c = function (c, f) { - a.addItem(c, function () { - Db.set_current(f); - b.scalebar.update() - }, Db.get_current() == f) - }; - c("Metric units", Db.metric); - c("Imperial units", Db.imperial); - c = function (c, f) { - a.addItem(c, function () { - Lb.sbClass = f; - b.replace() - }, Lb.sbClass == f) - }; - c("Default style", of); - c("Alternative style", vg); - a.addItem("Hide", function () { - ba.set("scale_bar", !1) - }) + var b = this; + + var unitMain = new dd; + unitMain.addItem("Metric", function () {Db.set_current(Db.metric);b.scalebar.update();b.update();}, Db.get_current() == Db.metric) + unitMain.addItem("Imperial", function () {Db.set_current(Db.imperial);b.scalebar.update();b.update();}, Db.get_current() == Db.imperial) + a.addSubmenu("Unit", unitMain); + + var styleMain = new dd; + styleMain.addItem("Default", function () {Lb.sbClass = of;b.replace()}, Lb.sbClass == of); + styleMain.addItem("Alternative", function () {Lb.sbClass = vg;b.replace()}, Lb.sbClass == vg); + a.addSubmenu("Style", styleMain); + + a.addItem("Hide", function () {ba.set("scale_bar", !1)}); }, replace: function () { null != this.scalebar && @@ -18014,16 +18002,12 @@ var $lime_init = function (A, t) { }, onContext: function (a) { var b = this; - a.addItem("Edit", function () { - b.title.edit(b.model) - }); + a.addItem("Edit", function () {b.title.edit(b.model)}); a.addItem("Reroll", function () { b.model.setName(b.model.rerollName()); b.title.setText(b.model.name) }); - a.addItem("Hide", function () { - ba.set("city_name", !1) - }) + a.addItem("Hide", function () {ba.set("city_name", !1); b.scene.toggleOverlays();}); }, exportPNG: function (a) { this.title.filterOn(!a) From 002de6e5ce191613a8a038ae7c7e52170501f208 Mon Sep 17 00:00:00 2001 From: SunSung-W541-2025 Date: Sun, 15 Feb 2026 13:51:45 +0100 Subject: [PATCH 10/19] =?UTF-8?q?edit/ui/all-menu=20[1.2.5-edit-ui-all-men?= =?UTF-8?q?u.0]=20=20=D0=BF=D0=BE=D1=87=D1=82=D0=B8=20=D0=B7=D0=B0=D0=BA?= =?UTF-8?q?=D0=BE=D0=BD=D1=87=D0=B8=D0=BB=20=D1=81=20=D0=B3=D0=BE=D1=80?= =?UTF-8?q?=D0=BE=D0=B4=D0=BE=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/mfcg.js | 59 +++++++++++++++++--------------------------------- 1 file changed, 20 insertions(+), 39 deletions(-) diff --git a/src/js/mfcg.js b/src/js/mfcg.js index 7d98a84..59e6e93 100644 --- a/src/js/mfcg.js +++ b/src/js/mfcg.js @@ -13856,21 +13856,6 @@ var $lime_init = function (A, t) { this.addButtonRow("Town", l(this, this.rerollName), "Districts", (G = this.model, l(G, G.rerollDistricts))); this.addSection("Points of interest"); this.addButtonRow("Load", l(this, this.onLoadPOIs), "Clear", l(this, this.onClearPOIs)); - this.addSeparator(); - this.addButtonRow("Warp", l(this, this.onWarp), "Overworld", l(this, this.onOverworld)); - var b = new ed; - b.setMargins(0, 8); - var c = new fb("Permalink"); - this.permalinkBtn = c; - c.set_width(96); - c.set_enabled(!be.importMode); - c.click.add(l(this, this.onCopyURL)); - b.add(c); - c = new fe("Export", ["PNG", "SVG", "JSON", "PROTO"]); - c.set_width(96); - c.action.add(l(this, this.onExport)); - b.add(c); - this.add(b); Bb.newModel.add(l(this, this.onNewModel)); Bb.titleChanged.add(l(this, this.onTitleChanged)); Bb.geometryChanged.add(l(this, this.onGeometryChanged)) @@ -14551,39 +14536,35 @@ var $lime_init = function (A, t) { // BEGIN // rootMenu.addItem("New city", l(this, this.buildNew)); - rootMenu.addItem("Warp", l(this, this.onWarp)); - - var c = new dd; - c.addItem("PNG", be.asPNG); - c.addItem("SVG", be.asSVG); - c.addItem("JSON", be.asJSON); - c.addItem("PROTO", be.asPROTO); - rootMenu.addItem("View in 3D", l(this, this.onViewIn3D)); rootMenu.addItem("Import...", l(this, this.onImport)); - rootMenu.addSubmenu("Export as", c); + + var exportMenu = new dd; + exportMenu.addItem("PNG", be.asPNG); + exportMenu.addItem("SVG", be.asSVG); + exportMenu.addItem("JSON", be.asJSON); + exportMenu.addItem("PROTO", be.asPROTO); + rootMenu.addSubmenu("Export as", exportMenu); + rootMenu.addItem("Permalink..", !this.permalinkDisabled ? l(this, this.onPermalink) : null) rootMenu.addSeparator(); // ###################### // - c = function (c, f) { - rootMenu.addItem(c, function () {contextThis.toggleWindow(f)}, null != u.findWidnow(f)); - }; - - rootMenu.addItem("Reroll all", function () { - var model = contextThis.model || Ub.instance; - null != model && model.rerollDistricts(); - }) + var rerollMenu = new dd; + var model = contextThis.model || Ub.instance; + rerollMenu.addItem("Districts names", model.rerollDistricts); + rerollMenu.addItem("Town name", model.rerollName); + rootMenu.addSubmenu("Reroll", rerollMenu); - rootMenu.addItem("Reroll title", function () { - var model = contextThis.model || Ub.instance; - null != model && model.setName(model.rerollName()); - }) + var editMenu = new dd; + editMenu.addItem("Settlement...", function () {contextThis.toggleWindow(rg)}, null != u.findWidnow(rg)); + editMenu.addSeparator(); + editMenu.addItem("Warp", l(this, this.onWarp)); + rootMenu.addSubmenu("Edit", editMenu); - c("Generate", Kd); - c("Settlement", rg); - c("Display...", ke); + rootMenu.addItem("Display...", function () {contextThis.toggleWindow(ke)}, null != u.findWidnow(ke)); + rootMenu.addItem("Generator...", function () {contextThis.toggleWindow(Kd)}, null != u.findWidnow(Kd)); rootMenu.addItem("Style...", ia.editColors); rootMenu.addSeparator(); From 70ed463d8c726c3fe462a9d5c1d41a033cadb476 Mon Sep 17 00:00:00 2001 From: SunSung-W541-2025 Date: Sun, 15 Feb 2026 14:12:44 +0100 Subject: [PATCH 11/19] =?UTF-8?q?edit/ui/all-menu=20[1.2.5-edit-ui-all-men?= =?UTF-8?q?u.0]=20=20=D0=BD=D0=BE=D1=80=D0=BC=D0=B0=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D1=8B=D0=B9=20=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=BE=D1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/mfcg.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/js/mfcg.js b/src/js/mfcg.js index 59e6e93..13fa415 100644 --- a/src/js/mfcg.js +++ b/src/js/mfcg.js @@ -13999,7 +13999,7 @@ var $lime_init = function (A, t) { ke.__super__ = vc; ke.prototype = v(vc.prototype, { getTitle: function () { - return "Style" + return "Display" }, addCheckbox: function (a, b, c, d, f) { a = new ud(a); @@ -14463,6 +14463,11 @@ var $lime_init = function (A, t) { onWarp: function () { bb.switchScene(jd) }, + onWarpTool: function (a) { + this.onWarp(); + var b = bb.scene; + null != b && b instanceof jd && b.keyMap.h.hasOwnProperty(a) && b.switchTool(b.keyMap.h[a]) + }, onImport: function () { var a = this, b = new Gf; @@ -14553,14 +14558,21 @@ var $lime_init = function (A, t) { var rerollMenu = new dd; var model = contextThis.model || Ub.instance; - rerollMenu.addItem("Districts names", model.rerollDistricts); - rerollMenu.addItem("Town name", model.rerollName); + rerollMenu.addItem("Districts names", null != model? function(){model.rerollDistricts();} : null); + rerollMenu.addItem("Town name", null != model? function(){model.setName(model.rerollName());} : null ); rootMenu.addSubmenu("Reroll", rerollMenu); var editMenu = new dd; editMenu.addItem("Settlement...", function () {contextThis.toggleWindow(rg)}, null != u.findWidnow(rg)); + editMenu.addItem("Measure", function () {contextThis.onWarpTool(77)}); editMenu.addSeparator(); - editMenu.addItem("Warp", l(this, this.onWarp)); + editMenu.addItem("Displace", function () {contextThis.onWarpTool(68)}); + editMenu.addItem("Rotate", function () {contextThis.onWarpTool(82)}); + editMenu.addItem("Liquify", function () {contextThis.onWarpTool(76)}); + editMenu.addItem("Relax", function () {contextThis.onWarpTool(88)}); + editMenu.addItem("Bloat", function () {contextThis.onWarpTool(66)}); + editMenu.addItem("Pinch", function () {contextThis.onWarpTool(80)}); + editMenu.addItem("Equalize", function () {contextThis.onWarpTool(69)}); rootMenu.addSubmenu("Edit", editMenu); rootMenu.addItem("Display...", function () {contextThis.toggleWindow(ke)}, null != u.findWidnow(ke)); From 60fbb345f3be5872959e9b0f46c538d6b30590d1 Mon Sep 17 00:00:00 2001 From: SunSung-W541-2025 Date: Sun, 15 Feb 2026 14:17:31 +0100 Subject: [PATCH 12/19] =?UTF-8?q?edit/ui/all-menu=20[1.2.5-edit-ui-all-men?= =?UTF-8?q?u.0]=20=20=D0=BB=D0=B8=D0=BD=D0=B5=D0=B9=D0=BA=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=BE=D1=80=D0=BC=D0=B0=D0=BB=D1=8C=D0=BD=D0=BE=20=D0=B2=20?= =?UTF-8?q?=D0=B8=D0=BD=D1=82=D0=B5=D1=80=D0=B0=D0=BA=D1=82=D0=B8=D0=B2?= =?UTF-8?q?=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/mfcg.js | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/src/js/mfcg.js b/src/js/mfcg.js index 13fa415..ab05140 100644 --- a/src/js/mfcg.js +++ b/src/js/mfcg.js @@ -16382,14 +16382,38 @@ var $lime_init = function (A, t) { this.showMenu(this.btnMenu) }, onContext: function (a) { - for (var b = this, c = this.keyMap.iterator(); c.hasNext();) { - var d = [c.next()]; + for (var b = this, c = [], d = this.keyMap.iterator(); d.hasNext();) c.push(d.next()); + var f = null; + d = 0; + for (var h = c.length; d < h;) { + var k = c[d]; + ++d; + if ("Measure" == k.getName()) { + f = k; + N.remove(c, k); + break + } + } + if (null != f) { + d = [f]; a.addItem(d[0].getName(), function (a) { return function () { b.switchTool(a[0]) } }(d), - d[0] == this.tool) + d[0] == this.tool); + a.addSeparator() + } + for (d = 0, h = c.length; d < h;) { + k = c[d]; + ++d; + var n = [k]; + a.addItem(n[0].getName(), function (a) { + return function () { + b.switchTool(a[0]) + } + }(n), + n[0] == this.tool) } a.addSeparator(); a.addItem("Apply", l(this, this.onSave)); From c25d7d53c6a77fc6fbc2e1ce4490b639d9c87c58 Mon Sep 17 00:00:00 2001 From: SunSung-W541-2025 Date: Sun, 15 Feb 2026 14:28:49 +0100 Subject: [PATCH 13/19] =?UTF-8?q?edit/ui/all-menu=20[1.2.5-edit-ui-all-men?= =?UTF-8?q?u.0]=20=20=D0=BB=D0=B8=D0=BD=D0=B5=D0=B9=D0=BA=D0=B0=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D0=BA=D1=80=D0=B8=D0=B2=D1=8B=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/mfcg.js | 126 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 100 insertions(+), 26 deletions(-) diff --git a/src/js/mfcg.js b/src/js/mfcg.js index ab05140..86beefc 100644 --- a/src/js/mfcg.js +++ b/src/js/mfcg.js @@ -14564,7 +14564,8 @@ var $lime_init = function (A, t) { var editMenu = new dd; editMenu.addItem("Settlement...", function () {contextThis.toggleWindow(rg)}, null != u.findWidnow(rg)); - editMenu.addItem("Measure", function () {contextThis.onWarpTool(77)}); + editMenu.addItem("Line measurement", function () {contextThis.onWarpTool(77)}); + editMenu.addItem("Curve measurement", function () {contextThis.onWarpTool(67)}); editMenu.addSeparator(); editMenu.addItem("Displace", function () {contextThis.onWarpTool(68)}); editMenu.addItem("Rotate", function () {contextThis.onWarpTool(82)}); @@ -16273,6 +16274,9 @@ var $lime_init = function (A, t) { h = new wi(this); k.h[77] = h; k = this.keyMap; + h = new Cmt(this); + k.h[67] = h; + k = this.keyMap; h = new xi(this); k.h[69] = h; if (null == jd.lastTool) this.switchTool(this.keyMap.h[68]); @@ -16383,37 +16387,43 @@ var $lime_init = function (A, t) { }, onContext: function (a) { for (var b = this, c = [], d = this.keyMap.iterator(); d.hasNext();) c.push(d.next()); - var f = null; - d = 0; - for (var h = c.length; d < h;) { - var k = c[d]; - ++d; - if ("Measure" == k.getName()) { - f = k; - N.remove(c, k); - break + var f = [], + h = 0; + for (var k = c.length; h < k;) { + var n = c[h]; + ++h; + if ("Line measurement" == n.getName() || "Curve measurement" == n.getName()) { + f.push(n); + N.remove(c, n); + --h; + --k } } - if (null != f) { - d = [f]; - a.addItem(d[0].getName(), function (a) { - return function () { - b.switchTool(a[0]) - } - }(d), - d[0] == this.tool); + if (0 < f.length) { + h = 0; + for (k = f.length; h < k;) { + n = f[h]; + ++h; + var p = [n]; + a.addItem(p[0].getName(), function (a) { + return function () { + b.switchTool(a[0]) + } + }(p), + p[0] == this.tool) + } a.addSeparator() } - for (d = 0, h = c.length; d < h;) { - k = c[d]; - ++d; - var n = [k]; - a.addItem(n[0].getName(), function (a) { + for (h = 0, k = c.length; h < k;) { + n = c[h]; + ++h; + p = [n]; + a.addItem(p[0].getName(), function (a) { return function () { b.switchTool(a[0]) } - }(n), - n[0] == this.tool) + }(p), + p[0] == this.tool) } a.addSeparator(); a.addItem("Apply", l(this, this.onSave)); @@ -18348,7 +18358,7 @@ var $lime_init = function (A, t) { wi.__super__ = Mb; wi.prototype = v(Mb.prototype, { getName: function () { - return "Measure" + return "Line measurement" }, activate: function () { this.scene.updateBrush(0); @@ -18383,6 +18393,70 @@ var $lime_init = function (A, t) { }, __class__: wi }); + var Cmt = function (a) { + this.points = []; + this.cur = null; + Mb.call(this, a) + }; + g["scenestools.CurveMeasureTool"] = Cmt; + Cmt.__name__ = "scenestools.CurveMeasureTool"; + Cmt.__super__ = Mb; + Cmt.prototype = v(Mb.prototype, { + getName: function () { + return "Curve measurement" + }, + activate: function () { + this.points = []; + this.cur = null; + this.scene.updateBrush(0); + this.scene.clearMesh() + }, + onPress: function (a, b) { + Mb.prototype.onPress.call(this, a, b); + this.points.push(new I(a, b)); + this.cur = null; + this.updateMesh(); + this.showDistance() + }, + onRelease: function () { + }, + onMove: function (a, b) { + 0 < this.points.length && (null == this.cur && (this.cur = new I(a, b)), this.cur.setTo(a, b), this.updateMesh()) + }, + onDrag: function (a, b) { + Mb.prototype.onDrag.call(this, a, b); + 0 < this.points.length && (null == this.cur && (this.cur = new I(a, b)), this.cur.setTo(a, b), this.updateMesh()) + }, + showDistance: function () { + if (1 < this.points.length) { + for (var a = 0, b = 1, c = this.points.length; b < c;) { + var d = this.points[b - 1], + f = this.points[b]; + ++b; + a += I.distance(d, f) + } + a = Db.get_current().measure(a); + b = a.value; + q.show((10 > b ? Math.round(10 * b) / 10 : Math.round(b)) + " " + a.system.unit) + } + }, + updateMesh: function () { + this.scene.clearMesh(); + for (var a = 1, b = this.points.length; a < b;) { + var c = this.points[a - 1], + d = this.points[a]; + ++a; + this.scene.drawEdge(c, d, 2) + } + for (a = 0, b = this.points.length; a < b;) { + c = this.points[a]; + ++a; + this.scene.drawNode(c, 4) + } + 0 < this.points.length && null != this.cur && (a = this.points[this.points.length - 1], this.scene.drawEdge(a, this.cur, 2), this.scene.drawNode(this.cur, 4)) + }, + __class__: Cmt + }); var vi = function (a) { me.call(this, a) }; From 42611915a3bf0a67a878735f2e568328b047a384 Mon Sep 17 00:00:00 2001 From: SunSung-W541-2025 Date: Sun, 15 Feb 2026 14:34:11 +0100 Subject: [PATCH 14/19] =?UTF-8?q?edit/ui/all-menu=20[1.2.5-edit-ui-all-men?= =?UTF-8?q?u.0]=20=20=D0=BD=D0=B0=D1=87=D0=B0=D0=BB=20=D1=87=D0=B5=D1=81?= =?UTF-8?q?=D0=B0=D1=82=D1=8C=20=D0=B4=D0=BE=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/Dwellings.js | 52 ++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/js/Dwellings.js b/src/js/Dwellings.js index 55ee51d..575e4dd 100644 --- a/src/js/Dwellings.js +++ b/src/js/Dwellings.js @@ -10082,8 +10082,8 @@ var $lime_init = function (K, v) { this.map.updateShading() } else this.editName(a) }, - fillViewMenu: function (a) { - var b = this, + fillViewMenu: function (rootMenu) { + var b = contextThis, c = new Ac; c.addItem("Regular", m(this, this.toggleRoomSet), !Z.gothicSet); c.addItem("Gothic", m(this, this.toggleRoomSet), Z.gothicSet); @@ -10092,7 +10092,7 @@ var $lime_init = function (K, v) { d.addItem(a, function () { ib.set("grid", mb.mode = c); - b.updateView() + contextThis.updateView() }).setCheck(mb.mode == c) }; g("Hidden", "hidden"); @@ -10107,7 +10107,7 @@ var $lime_init = function (K, v) { g = function (a, c) { f.addItem(a, function () { ib.set("doors", nd.mode = c); - b.updateView() + contextThis.updateView() }).setCheck(nd.mode == c) }; g("Hidden", "hidden"); @@ -10132,7 +10132,7 @@ var $lime_init = function (K, v) { var l = new Ac; k = function (a, c) { l.addItem(a, function () { - b.applyArchiPreset(c) + contextThis.applyArchiPreset(c) }) }; k("Simple", "simple"); @@ -10141,45 +10141,45 @@ var $lime_init = function (K, v) { k("Modern", "modern"); k("Sci-fi", "scifi"); - a.addItem("Elevation", m(this, this.switchView)); - a.addItem("Blueprint", m(this, this.switchToBlueprint)); + rootMenu.addItem("Elevation", m(this, this.switchView)); + rootMenu.addItem("Blueprint", m(this, this.switchToBlueprint)); var exportMenu = new Ac; this.fillExportMenu(exportMenu); - a.addItem("Import...", m(this, this.importPlan)); - 0 < g.items.length && a.addSubmenu("Export as", exportMenu); - a.addItem("Permalink...", !this.permalinkDisabled?m(this, this.onPermalink):null); + rootMenu.addItem("Import...", m(this, this.importPlan)); + 0 < g.items.length && rootMenu.addSubmenu("Export as", exportMenu); + rootMenu.addItem("Permalink...", !this.permalinkDisabled?m(this, this.onPermalink):null); - a.addSeparator(); - a.addItem("Parameters...", m(this, this.showParams)); - a.addSubmenu("Layers", g); - a.addSubmenu("Rooms", c); - a.addSubmenu("Walls", l); - a.addItem("Style...", m(this, this.showColors)); + rootMenu.addSeparator(); + rootMenu.addItem("Parameters...", m(this, this.showParams)); + rootMenu.addSubmenu("Layers", g); + rootMenu.addSubmenu("Rooms", c); + rootMenu.addSubmenu("Walls", l); + rootMenu.addItem("Style...", m(this, this.showColors)); ub.prototype.fillViewMenu.call(this, a) }, - fillExportMenu: function (a) { + fillExportMenu: function (rootMenu) { var b = this; ub.prototype.fillExportMenu.call(this, a); - a.addItem("JSON", function () { + rootMenu.addItem("JSON", function () { sb.runBusy("Exporting JSON file...", function () { - sb.export(b.house) + sb.export(contextThis.house) }, function (c) { var msg = c && c.message || "" + c; console.error(msg); ma.showToast(msg) }) }); - a.addItem("PROTO", function () { + rootMenu.addItem("PROTO", function () { sb.runBusy("Exporting PROTO file...", function () { - sb.exportAsProto(b.house) + sb.exportAsProto(contextThis.house) }, function (c) { var msg = c && c.message || "" + c; console.error(msg); ma.showToast(msg) }) }); - a.addItem("Advanced...", m(this, this.multiExport)) + rootMenu.addItem("Advanced...", m(this, this.multiExport)) }, reset: function (a) { this.permalinkDisabled=!1; @@ -10297,16 +10297,16 @@ var $lime_init = function (K, v) { this.map.updateLabels(this.house) }, getRoofSubmenu: function () { - var a = this, + var contextThis = this, b = new Ac; b.addItem("Simple", function () { - a.setRoofMode(!0, !1) + contextThis.setRoofMode(!0, !1) }, Ea.displayed && !Ea.detailed); b.addItem("Detailed", function () { - a.setRoofMode(!0, !0) + contextThis.setRoofMode(!0, !0) }, Ea.displayed && Ea.detailed); b.addItem("Hidden", function () { - a.setRoofMode(!1, !1) + contextThis.setRoofMode(!1, !1) }, !Ea.displayed); b.addSeparator(); b.addItem("Shade", Ea.detailed ? m(this, this.toggleRoofShading) : null, Ea.shading); From 905b4cffb0734228c468e02b654d0ea0b982e731 Mon Sep 17 00:00:00 2001 From: SunSung-W541-2025 Date: Sun, 15 Feb 2026 14:55:19 +0100 Subject: [PATCH 15/19] =?UTF-8?q?edit/ui/all-menu=20[1.2.5-edit-ui-all-men?= =?UTF-8?q?u.0]=20=20=D0=BF=D1=80=D0=BE=D1=86=D0=B5=D1=81=D1=81=20=D0=B4?= =?UTF-8?q?=D0=BE=D0=BC=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/Dwellings.js | 88 +++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 51 deletions(-) diff --git a/src/js/Dwellings.js b/src/js/Dwellings.js index 575e4dd..d57a9ab 100644 --- a/src/js/Dwellings.js +++ b/src/js/Dwellings.js @@ -10083,43 +10083,42 @@ var $lime_init = function (K, v) { } else this.editName(a) }, fillViewMenu: function (rootMenu) { - var b = contextThis, - c = new Ac; + var contextThis = this; + + rootMenu.addItem("Import...", m(this, this.importPlan)); + var exportMenu = new Ac; + this.fillExportMenu(exportMenu); + rootMenu.addSubmenu("Export as", exportMenu); + rootMenu.addItem("Permalink...", !this.permalinkDisabled?m(this, this.onPermalink):null); + rootMenu.addSeparator(); + + // ###################### // + + var c = new Ac; c.addItem("Regular", m(this, this.toggleRoomSet), !Z.gothicSet); c.addItem("Gothic", m(this, this.toggleRoomSet), Z.gothicSet); - var d = new Ac, - g = function (a, c) { - d.addItem(a, - function () { - ib.set("grid", mb.mode = c); - contextThis.updateView() - }).setCheck(mb.mode == c) - }; - g("Hidden", "hidden"); - g("Solid", "solid"); - g("Dashes", "dashes"); - g("Dots", "dots"); - g("Planks", "planks"); - g("Tiles", "tiles"); + var d = new Ac; + + d.addItem("Hidden", function () {ib.set("grid", mb.mode = "hidden");contextThis.updateView()}).setCheck(mb.mode == "hidden"); + d.addItem("Solid", function () {ib.set("grid", mb.mode = "solid");contextThis.updateView()}).setCheck(mb.mode == "solid"); + d.addItem("Dashes", function () {ib.set("grid", mb.mode = "dashes");contextThis.updateView()}).setCheck(mb.mode == "dashes"); + d.addItem("Dots", function () {ib.set("grid", mb.mode = "dots");contextThis.updateView()}).setCheck(mb.mode == "dots"); + d.addItem("Planks", function () {ib.set("grid", mb.mode = "planks");contextThis.updateView()}).setCheck(mb.mode == "planks"); + d.addItem("Tiles", function () {ib.set("grid", mb.mode = "tiles");contextThis.updateView()}).setCheck(mb.mode == "tiles"); + d.addSeparator(); d.addItem("Double", m(this, this.toggleDoubleGrid)).setCheck(mb.double); var f = new Ac; - g = function (a, c) { - f.addItem(a, function () { - ib.set("doors", nd.mode = c); - contextThis.updateView() - }).setCheck(nd.mode == c) - }; - g("Hidden", "hidden"); - g("Simple", "simple"); - g("Open", "open"); + f.addItem("Hidden", function () {ib.set("doors", nd.mode = "hidden");contextThis.updateView()}).setCheck(nd.mode == "hidden"); + f.addItem("Simple", function () {ib.set("doors", nd.mode = "simple");contextThis.updateView()}).setCheck(nd.mode == "simple"); + f.addItem("Open", function () {ib.set("doors", nd.mode = "open");contextThis.updateView()}).setCheck(nd.mode == "open"); + var k = new Ac; - k.addItem("Names", m(this, this.labelsShown), - Qc.isVisible && !Qc.showNumbers); + k.addItem("Names", m(this, this.labelsShown), Qc.isVisible && !Qc.showNumbers); k.addItem("Numbers", m(this, this.labelsNumbers), Qc.isVisible && Qc.showNumbers); k.addItem("Hidden", m(this, this.labelsHidden), !Qc.isVisible); var q = this.getRoofSubmenu(); - g = new Ac; + var g = new Ac; g.addSubmenu("Grid", d); g.addSubmenu("Doors", f); g.addSubmenu("Labels", k); @@ -10127,40 +10126,27 @@ var $lime_init = function (K, v) { g.addItem("Arrows", m(this, this.toggleArrows), Sa.showArrows); g.addItem("Props", m(this, this.toggleProps), Sa.showProps); g.addItem("AO", m(this, this.toggleAO), Sa.showAO); - g.addItem("Lights", m(this, this.toggleLights), - Sa.showLights); + g.addItem("Lights", m(this, this.toggleLights), Sa.showLights); var l = new Ac; - k = function (a, c) { - l.addItem(a, function () { - contextThis.applyArchiPreset(c) - }) - }; - k("Simple", "simple"); - k("Castle", "castle"); - k("Log house", "logs"); - k("Modern", "modern"); - k("Sci-fi", "scifi"); + + l.addItem("Simple", function () {contextThis.applyArchiPreset("simple")}); + l.addItem("Castle", function () {contextThis.applyArchiPreset("castle")}); + l.addItem("Log house", function () {contextThis.applyArchiPreset("logs")}); + l.addItem("Modern", function () {contextThis.applyArchiPreset("modern")}); + l.addItem("Sci-fi", function () {contextThis.applyArchiPreset("scifi")}); rootMenu.addItem("Elevation", m(this, this.switchView)); rootMenu.addItem("Blueprint", m(this, this.switchToBlueprint)); - var exportMenu = new Ac; - this.fillExportMenu(exportMenu); - rootMenu.addItem("Import...", m(this, this.importPlan)); - 0 < g.items.length && rootMenu.addSubmenu("Export as", exportMenu); - rootMenu.addItem("Permalink...", !this.permalinkDisabled?m(this, this.onPermalink):null); - - rootMenu.addSeparator(); rootMenu.addItem("Parameters...", m(this, this.showParams)); rootMenu.addSubmenu("Layers", g); rootMenu.addSubmenu("Rooms", c); rootMenu.addSubmenu("Walls", l); rootMenu.addItem("Style...", m(this, this.showColors)); - ub.prototype.fillViewMenu.call(this, a) + ub.prototype.fillViewMenu.call(this, rootMenu) }, fillExportMenu: function (rootMenu) { - var b = - this; - ub.prototype.fillExportMenu.call(this, a); + var contextThis = this; + ub.prototype.fillExportMenu.call(this, rootMenu); rootMenu.addItem("JSON", function () { sb.runBusy("Exporting JSON file...", function () { sb.export(contextThis.house) From 3546013e0936d2077e348edd58c873617bef2752 Mon Sep 17 00:00:00 2001 From: SunSung-W541-2025 Date: Sun, 15 Feb 2026 15:21:01 +0100 Subject: [PATCH 16/19] =?UTF-8?q?edit/ui/all-menu=20[1.2.5-edit-ui-all-men?= =?UTF-8?q?u.0]=20=20=D0=BE=D0=B4=D0=BD=D1=83=20=D0=BF=D1=80=D0=B8=D1=87?= =?UTF-8?q?=D0=B5=D1=81=D0=B0=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/Dwellings.js | 91 ++++++++++++++++++++++++--------------------- 1 file changed, 49 insertions(+), 42 deletions(-) diff --git a/src/js/Dwellings.js b/src/js/Dwellings.js index d57a9ab..69f8c03 100644 --- a/src/js/Dwellings.js +++ b/src/js/Dwellings.js @@ -10085,6 +10085,8 @@ var $lime_init = function (K, v) { fillViewMenu: function (rootMenu) { var contextThis = this; + rootMenu.addItem("View outside", m(this, this.switchView)); + rootMenu.addItem("Import...", m(this, this.importPlan)); var exportMenu = new Ac; this.fillExportMenu(exportMenu); @@ -10094,53 +10096,58 @@ var $lime_init = function (K, v) { // ###################### // - var c = new Ac; - c.addItem("Regular", m(this, this.toggleRoomSet), !Z.gothicSet); - c.addItem("Gothic", m(this, this.toggleRoomSet), Z.gothicSet); - var d = new Ac; + rootMenu.addItem("Edit...", m(this, this.switchToBlueprint)); + + var displayMenu = new Ac; + + var gridMenu = new Ac; + gridMenu.addItem("Hidden", function () {ib.set("grid", mb.mode = "hidden");contextThis.updateView()}).setCheck(mb.mode == "hidden"); + gridMenu.addItem("Solid", function () {ib.set("grid", mb.mode = "solid");contextThis.updateView()}).setCheck(mb.mode == "solid"); + gridMenu.addItem("Dashes", function () {ib.set("grid", mb.mode = "dashes");contextThis.updateView()}).setCheck(mb.mode == "dashes"); + gridMenu.addItem("Dots", function () {ib.set("grid", mb.mode = "dots");contextThis.updateView()}).setCheck(mb.mode == "dots"); + gridMenu.addItem("Planks", function () {ib.set("grid", mb.mode = "planks");contextThis.updateView()}).setCheck(mb.mode == "planks"); + gridMenu.addItem("Tiles", function () {ib.set("grid", mb.mode = "tiles");contextThis.updateView()}).setCheck(mb.mode == "tiles"); + gridMenu.addSeparator(); + gridMenu.addItem("Double", m(this, this.toggleDoubleGrid)).setCheck(mb.double); + displayMenu.addSubmenu("Grid", gridMenu); + + var doorsMenu = new Ac; + doorsMenu.addItem("Hidden", function () {ib.set("doors", nd.mode = "hidden");contextThis.updateView()}).setCheck(nd.mode == "hidden"); + doorsMenu.addItem("Simple", function () {ib.set("doors", nd.mode = "simple");contextThis.updateView()}).setCheck(nd.mode == "simple"); + doorsMenu.addItem("Open", function () {ib.set("doors", nd.mode = "open");contextThis.updateView()}).setCheck(nd.mode == "open"); + displayMenu.addSubmenu("Doors", doorsMenu); + + var labelsMenu = new Ac; + labelsMenu.addItem("Names", m(this, this.labelsShown), Qc.isVisible && !Qc.showNumbers); + labelsMenu.addItem("Numbers", m(this, this.labelsNumbers), Qc.isVisible && Qc.showNumbers); + labelsMenu.addItem("Hidden", m(this, this.labelsHidden), !Qc.isVisible); + displayMenu.addSubmenu("Labels", labelsMenu); + + var wallsMenu = new Ac; + wallsMenu.addItem("Simple", function () {contextThis.applyArchiPreset("simple")}); + wallsMenu.addItem("Castle", function () {contextThis.applyArchiPreset("castle")}); + wallsMenu.addItem("Log house", function () {contextThis.applyArchiPreset("logs")}); + wallsMenu.addItem("Modern", function () {contextThis.applyArchiPreset("modern")}); + wallsMenu.addItem("Sci-fi", function () {contextThis.applyArchiPreset("scifi")}); + displayMenu.addSubmenu("Walls", wallsMenu); - d.addItem("Hidden", function () {ib.set("grid", mb.mode = "hidden");contextThis.updateView()}).setCheck(mb.mode == "hidden"); - d.addItem("Solid", function () {ib.set("grid", mb.mode = "solid");contextThis.updateView()}).setCheck(mb.mode == "solid"); - d.addItem("Dashes", function () {ib.set("grid", mb.mode = "dashes");contextThis.updateView()}).setCheck(mb.mode == "dashes"); - d.addItem("Dots", function () {ib.set("grid", mb.mode = "dots");contextThis.updateView()}).setCheck(mb.mode == "dots"); - d.addItem("Planks", function () {ib.set("grid", mb.mode = "planks");contextThis.updateView()}).setCheck(mb.mode == "planks"); - d.addItem("Tiles", function () {ib.set("grid", mb.mode = "tiles");contextThis.updateView()}).setCheck(mb.mode == "tiles"); + displayMenu.addSubmenu("Roof", this.getRoofSubmenu()); + displayMenu.addItem("Arrows", m(this, this.toggleArrows), Sa.showArrows); + displayMenu.addItem("Props", m(this, this.toggleProps), Sa.showProps); + displayMenu.addItem("AO", m(this, this.toggleAO), Sa.showAO); + displayMenu.addItem("Lights", m(this, this.toggleLights), Sa.showLights); + rootMenu.addSubmenu("Display", displayMenu); - d.addSeparator(); - d.addItem("Double", m(this, this.toggleDoubleGrid)).setCheck(mb.double); - var f = new Ac; - f.addItem("Hidden", function () {ib.set("doors", nd.mode = "hidden");contextThis.updateView()}).setCheck(nd.mode == "hidden"); - f.addItem("Simple", function () {ib.set("doors", nd.mode = "simple");contextThis.updateView()}).setCheck(nd.mode == "simple"); - f.addItem("Open", function () {ib.set("doors", nd.mode = "open");contextThis.updateView()}).setCheck(nd.mode == "open"); + var generatorMenu = new Ac; + generatorMenu.addItem("Parameters...", m(this, this.showParams)); - var k = new Ac; - k.addItem("Names", m(this, this.labelsShown), Qc.isVisible && !Qc.showNumbers); - k.addItem("Numbers", m(this, this.labelsNumbers), Qc.isVisible && Qc.showNumbers); - k.addItem("Hidden", m(this, this.labelsHidden), !Qc.isVisible); - var q = this.getRoofSubmenu(); - var g = new Ac; - g.addSubmenu("Grid", d); - g.addSubmenu("Doors", f); - g.addSubmenu("Labels", k); - g.addSubmenu("Roof", q); - g.addItem("Arrows", m(this, this.toggleArrows), Sa.showArrows); - g.addItem("Props", m(this, this.toggleProps), Sa.showProps); - g.addItem("AO", m(this, this.toggleAO), Sa.showAO); - g.addItem("Lights", m(this, this.toggleLights), Sa.showLights); - var l = new Ac; + var roomsMenu = new Ac; + roomsMenu.addItem("Regular", m(this, this.toggleRoomSet), !Z.gothicSet); + roomsMenu.addItem("Gothic", m(this, this.toggleRoomSet), Z.gothicSet); + generatorMenu.addSubmenu("Rooms", roomsMenu); - l.addItem("Simple", function () {contextThis.applyArchiPreset("simple")}); - l.addItem("Castle", function () {contextThis.applyArchiPreset("castle")}); - l.addItem("Log house", function () {contextThis.applyArchiPreset("logs")}); - l.addItem("Modern", function () {contextThis.applyArchiPreset("modern")}); - l.addItem("Sci-fi", function () {contextThis.applyArchiPreset("scifi")}); + rootMenu.addSubmenu("Generator", generatorMenu); - rootMenu.addItem("Elevation", m(this, this.switchView)); - rootMenu.addItem("Blueprint", m(this, this.switchToBlueprint)); - rootMenu.addItem("Parameters...", m(this, this.showParams)); - rootMenu.addSubmenu("Layers", g); - rootMenu.addSubmenu("Rooms", c); - rootMenu.addSubmenu("Walls", l); rootMenu.addItem("Style...", m(this, this.showColors)); ub.prototype.fillViewMenu.call(this, rootMenu) }, From e7274e52992ea420a72f4f393a7950ae0b72be02 Mon Sep 17 00:00:00 2001 From: SunSung-W541-2025 Date: Sun, 15 Feb 2026 15:32:52 +0100 Subject: [PATCH 17/19] =?UTF-8?q?edit/ui/all-menu=20[1.2.5-edit-ui-all-men?= =?UTF-8?q?u.0]=20=20=D1=81=D1=82=D0=B5=D0=BD=D1=8B=20=D1=81=D1=82=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=D1=87=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/Dwellings.js | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/src/js/Dwellings.js b/src/js/Dwellings.js index 69f8c03..72f433b 100644 --- a/src/js/Dwellings.js +++ b/src/js/Dwellings.js @@ -9968,9 +9968,17 @@ var $lime_init = function (K, v) { this.updateView() }, toggleFortified: function () { - A.fortified = !A.fortified; + var nextFortified = !A.fortified; + if (nextFortified) { + this.applyArchiPreset("castle"); + return + } + A.fortified = !1; A.random(); - this.updateView() + var currentArchi = ib.get("architecture"); + if (null == currentArchi || "" == currentArchi || "architecture_unspecified" == currentArchi || "castle" == currentArchi) { + this.applyArchiPreset("simple") + } else this.updateView() }, toggleColors: function () { ib.set("colorize", bd.dark = !bd.dark); @@ -9985,6 +9993,17 @@ var $lime_init = function (K, v) { ib.set("fading", Ae.useFading = !Ae.useFading); this.updateView() }, + applyArchitecture: function (a) { + hb.setStyle(a); + this.house.updateProps(); + this.updateView() + }, + applyArchiPreset: function (a) { + var prevFortified = A.fortified; + "castle" == a ? A.fortified = !0 : A.fortified && (A.fortified = !1); + A.fortified != prevFortified && A.random(); + this.applyArchitecture(a) + }, reset: function (a) { ub.prototype.reset.call(this, a); this.sideSelector.update(this.house); @@ -10124,11 +10143,13 @@ var $lime_init = function (K, v) { displayMenu.addSubmenu("Labels", labelsMenu); var wallsMenu = new Ac; - wallsMenu.addItem("Simple", function () {contextThis.applyArchiPreset("simple")}); - wallsMenu.addItem("Castle", function () {contextThis.applyArchiPreset("castle")}); - wallsMenu.addItem("Log house", function () {contextThis.applyArchiPreset("logs")}); - wallsMenu.addItem("Modern", function () {contextThis.applyArchiPreset("modern")}); - wallsMenu.addItem("Sci-fi", function () {contextThis.applyArchiPreset("scifi")}); + var currentArchi = ib.get("architecture"); + (null == currentArchi || "" == currentArchi || "architecture_unspecified" == currentArchi) && (currentArchi = "simple"); + wallsMenu.addItem("Simple", function () {contextThis.applyArchiPreset("simple")}, "simple" == currentArchi); + wallsMenu.addItem("Castle", function () {contextThis.applyArchiPreset("castle")}, "castle" == currentArchi); + wallsMenu.addItem("Log house", function () {contextThis.applyArchiPreset("logs")}, "logs" == currentArchi); + wallsMenu.addItem("Modern", function () {contextThis.applyArchiPreset("modern")}, "modern" == currentArchi); + wallsMenu.addItem("Sci-fi", function () {contextThis.applyArchiPreset("scifi")}, "scifi" == currentArchi); displayMenu.addSubmenu("Walls", wallsMenu); displayMenu.addSubmenu("Roof", this.getRoofSubmenu()); @@ -10376,6 +10397,9 @@ var $lime_init = function (K, v) { this.updateView() }, applyArchiPreset: function (a) { + var prevFortified = A.fortified; + "castle" == a ? A.fortified = !0 : A.fortified && (A.fortified = !1); + A.fortified != prevFortified && A.random(); this.applyArchitecture(a) }, showColors: function () { From 6ccd7f93c96ae5ad812138917e56144b7857ed1c Mon Sep 17 00:00:00 2001 From: SunSung-W541-2025 Date: Sun, 15 Feb 2026 15:50:41 +0100 Subject: [PATCH 18/19] =?UTF-8?q?edit/ui/all-menu=20[1.2.5-edit-ui-all-men?= =?UTF-8?q?u.0]=20=20=D0=BD=D0=B0=D0=BA=D0=BE=D0=BD=D0=B5=D1=86=20=D1=82?= =?UTF-8?q?=D0=BE=20=D0=BA=D0=BE=D0=BD=D0=B5=D1=86=20=D1=81=20=D0=B4=D0=BE?= =?UTF-8?q?=D0=BC=D0=BE=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/Dwellings.js | 61 ++++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 26 deletions(-) diff --git a/src/js/Dwellings.js b/src/js/Dwellings.js index 72f433b..95f4611 100644 --- a/src/js/Dwellings.js +++ b/src/js/Dwellings.js @@ -9473,19 +9473,15 @@ var $lime_init = function (K, v) { showContextMenu: function (a, b) { null == b && (b = 0); null == a && (a = 0); - var c = this, - d = new Ac; - d.addItem("New house", function () {c.reset(Xd.random())}); + var c = this, d = new Ac; this.fillViewMenu(d); - d.addItem("About", function () { - null == ma.findForm(AboutDialogForm) && ma.showDialog(new AboutDialogForm) - }); 0 == a && 0 == b ? ma.showMenu(d) : ma.showMenuAt(d, a, b) }, fillViewMenu: function (a) { a.addSeparator(); - Oa.mobile || a.addItem("Fullscreen", m(this, this.toggleFullscreen), 2 != this.stage.get_displayState()) + Oa.mobile || a.addItem("Fullscreen", m(this, this.toggleFullscreen), 2 != this.stage.get_displayState()); + a.addItem("About", function () {null == ma.findForm(AboutDialogForm) && ma.showDialog(new AboutDialogForm)}); }, fillExportMenu: function (a) { a.addItem("PNG", m(this, this.exportAsPNG)); @@ -9738,15 +9734,13 @@ var $lime_init = function (K, v) { ub.prototype.onKey.call(this, a, b) } else 16 == a && this.view.set_showWalls(!1) }, - fillViewMenu: function (a) { - a.addItem("Random", m(this, this.random)); - a.addItem("Box", m(this, this.box)); - a.addItem("Clear", m(this, this.clear)); - a.addSeparator(); - a.addItem("Submit", m(this, this.submit)); - a.addItem("Discard", m(this, this.discard)); - a.addSeparator(); - ub.prototype.fillViewMenu.call(this, a) + fillViewMenu: function (rootMenu) { + rootMenu.addItem("Random", m(this, this.random)); + rootMenu.addItem("Box", m(this, this.box)); + rootMenu.addItem("Clear", m(this, this.clear)); + rootMenu.addSeparator(); + rootMenu.addItem("Submit", m(this, this.submit)); + rootMenu.addItem("Discard", m(this, this.discard)); }, submit: function () { this.reset(fd.inst.bp) @@ -9943,16 +9937,30 @@ var $lime_init = function (K, v) { ub.prototype.onKey.call(this, a, b) } }, - fillViewMenu: function (a) { - a.addItem("Floor plans", m(this, this.switchView)); - a.addItem("Blueprint", m(this, - this.switchToBlueprint)); - a.addSeparator(); - a.addItem("Reroll", m(this, this.rerollDimensions)); - a.addItem("Fortified", m(this, this.toggleFortified)).setCheck(A.fortified); - a.addItem("Dark", m(this, this.toggleColors)).setCheck(I.mode == Pe.DARK); - a.addItem("Fade", m(this, this.toggleFading)).setCheck(Ae.useFading); - ub.prototype.fillViewMenu.call(this, a) + fillViewMenu: function (rootMenu) { + var contextThis = this; + + rootMenu.addItem("New house", function () {contextThis.reset(Xd.random())}); + rootMenu.addItem("View inside", m(this, this.switchView)); + + var exportMenu = new Ac; + this.fillExportMenu(exportMenu); + rootMenu.addSubmenu("Export as", exportMenu); + rootMenu.addItem("Permalink...", !this.permalinkDisabled?m(this, this.onPermalink):null); + rootMenu.addSeparator(); + + // ###################### // + + rootMenu.addItem("Edit...", m(this, this.switchToBlueprint)); + rootMenu.addItem("Reroll", m(this, this.rerollDimensions)); + + var displayMenu = new Ac; + displayMenu.addItem("Fortified", m(this, this.toggleFortified)).setCheck(A.fortified); + displayMenu.addItem("Dark", m(this, this.toggleColors)).setCheck(I.mode == Pe.DARK); + displayMenu.addItem("Fade", m(this, this.toggleFading)).setCheck(Ae.useFading); + rootMenu.addSubmenu("Display", displayMenu); + + ub.prototype.fillViewMenu.call(this, rootMenu) }, setDir: function (a) { this.sideSelector.select(bd.curDir = a); @@ -10104,6 +10112,7 @@ var $lime_init = function (K, v) { fillViewMenu: function (rootMenu) { var contextThis = this; + rootMenu.addItem("New house", function () {contextThis.reset(Xd.random())}); rootMenu.addItem("View outside", m(this, this.switchView)); rootMenu.addItem("Import...", m(this, this.importPlan)); From 06e609bb33205101cc96d6a3b9186b8867a6ad10 Mon Sep 17 00:00:00 2001 From: SunSung-W541-2025 Date: Sun, 15 Feb 2026 16:02:21 +0100 Subject: [PATCH 19/19] =?UTF-8?q?edit/ui/all-menu=20[1.2.5-edit-ui-all-men?= =?UTF-8?q?u.0]=20=20=D1=81=D0=BA=D1=80=D0=BE=D0=BB=20=D0=B4=D0=BB=D1=8F?= =?UTF-8?q?=20=D0=B4=D0=BE=D0=BC=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/js/Dwellings.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/js/Dwellings.js b/src/js/Dwellings.js index 95f4611..00f6425 100644 --- a/src/js/Dwellings.js +++ b/src/js/Dwellings.js @@ -9448,14 +9448,16 @@ var $lime_init = function (K, v) { Jb.prototype.activate.call(this); this.stage.addEventListener("touchTap", m(this, this.onTap)); this.stage.addEventListener("click", m(this, this.onClick)); - this.stage.addEventListener("rightClick", m(this, this.onRightClick)) + this.stage.addEventListener("rightClick", m(this, this.onRightClick)); + this.stage.addEventListener("mouseWheel", m(this, this.onWheel)) }, deactivate: function () { Jb.prototype.deactivate.call(this); ma.layer.removeChild(this.modeSelector); this.stage.removeEventListener("touchTap", m(this, this.onTap)); this.stage.removeEventListener("click", m(this, this.onClick)); - this.stage.removeEventListener("rightClick", m(this, this.onRightClick)) + this.stage.removeEventListener("rightClick", m(this, this.onRightClick)); + this.stage.removeEventListener("mouseWheel", m(this, this.onWheel)) }, onTap: function (a) { ma.checkTarget(a.target) || @@ -9466,6 +9468,9 @@ var $lime_init = function (K, v) { onRightClick: function (a) { ma.checkTarget(a.target) || this.showContextMenu() }, + onWheel: function (a) { + 0 < a.delta ? this.onKey(39, !0) : 0 > a.delta && this.onKey(37, !0) + }, onMenuButton: function (a) { a = a.getBounds(ma.layer); this.showContextMenu(a.get_left(), a.get_bottom())