From cf97ae668db7ee8d86e04ce65148bb05c6fd0288 Mon Sep 17 00:00:00 2001 From: Jonas Reith Date: Sun, 30 Aug 2026 19:41:51 +0200 Subject: [PATCH] Add a direct Biome-view shortcut button to the toolbar During Tectonics/Hydrology there was no direct way to see the world's actual terrain type (deserts/forests/tundra/etc, colour mode Biome) -- the only paths were opening the 13-entry View Mode dropdown, or an accidental side effect of toggling Ecoregions off (which happens to land on Biome). Added a one-click "Biome view (5)" button right under the dropdown, outside the scrollable body so it needs no scrolling and is visible from the very start of World Creation, before any Civilization & Ecology feature is relevant. Verified live: fresh world, Tectonics phase, single click correctly switches to Biome view showing deserts/forests/ice caps. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01TMfyZv91tonDnPJqbaTVJE --- CLAUDE.md | 9 +++++++++ src/render/Toolbar.cpp | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 80fb78b..f44e6c6 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -422,6 +422,15 @@ on the Live World clock). **Steps 1–7 of the roadmap are done (plus a derived "Alliances" checkbox in Overlays), `&&`-ed into just the ally/rival arc draw calls (3D + 2D) so political borders/war fronts still show under Territory regardless — Territory now toggles cleanly with or without the arcs. `src/render` only, no save-format change. +- **Toolbar: a direct one-click "Biome view" shortcut** *(done)* — during Tectonics/Hydrology (before + any Civilization & Ecology feature is even relevant) the only way to see the world's actual terrain + type (deserts/forests/tundra/etc., colour mode `Biome`) was to open the 13-entry View Mode dropdown + and pick it out, or reach it as an accidental side effect of toggling `Ecoregions (E)` off (its + toggle lands on `Biome` specifically). Added a **"Biome view (5)"** toggle-styled button directly + under the dropdown — outside the scrollable body, so it's visible immediately without scrolling — + that just sets `mode = ColorMode::Biome` (matching the plain `5` key, no side effects, works from + the very start of World Creation). Purely additive; the dropdown entry and `5` key are unchanged. + `src/render` only (`Toolbar.cpp`), no save-format change. ## Current state diff --git a/src/render/Toolbar.cpp b/src/render/Toolbar.cpp index 17cfd4f..4ac17d1 100644 --- a/src/render/Toolbar.cpp +++ b/src/render/Toolbar.cpp @@ -107,6 +107,18 @@ void drawToolbar(Viewer& v) { float x = panel.x + PAD, w = panel.width - 2 * PAD; float y = panel.y + PAD; Rectangle dropRect = takeRow(x, w, y, 24.0f); // reserved now, drawn LAST so its open list is on top + // Direct one-click shortcut to the Biome view (color mode 5) -- the single view that actually + // shows terrain type (deserts/forests/tundra/etc.), which is otherwise only reachable by opening + // the dropdown above and picking it out of 13 entries, or as an accidental side effect of + // toggling Ecoregions off (that lands on Biome too). Kept outside the scroll body, right under + // the dropdown, so it's visible immediately -- including during Tectonics/Hydrology, before any + // Civilization & Ecology button is even enabled. + { + bool isBiome = v.mode == ColorMode::Biome; + bool shadow = isBiome; + GuiToggle(takeRow(x, w, y), "Biome view (5)", &shadow); + if (shadow != isBiome) { v.mode = ColorMode::Biome; v.recolor(); } + } y += SECTION_GAP * 0.5f; Rectangle scrollBounds{ panel.x, y, panel.width, (panel.y + panel.height) - y };