3 Commits

Author SHA1 Message Date
7c0dcb7843 Add labeled atlas export (Shift+F11): every place/settlement name, no overlap
A second, reference-style export alongside exportMapImage(): renders at ~8K and
labels every named geography feature and every living settlement (settlement
names weren't drawn as text anywhere before this), using a greedy
priority-based placement pass that only draws a label if its box doesn't
collide with one already placed -- so text never overlaps regardless of how
densely settlements cluster. Keeps label font size well below the resolution
scale, since scaling text 1:1 with a bigger canvas would just reproduce the
same crowding at a bigger size.

Also uses the plain colour-mode vcolors rather than displayColors(), since in
Live World the latter is day/night-dimmed -- a reference atlas should read the
same everywhere, not have an arbitrary half of it darkened by whatever moment
it was exported.
2026-08-30 18:01:18 +02:00
ddeba0dea8 Add high-resolution 2D map export (F11 / toolbar button)
Exports the full Equal Earth map as a ~4K PNG via an off-screen RenderTexture2D,
reusing the existing Map2D/Overlays drawing code (already parameterized by an
arbitrary target Rectangle) at scale. Extracted the overlay-drawing body of
renderMap2D() into a shared, scale-parameterized Viewer::drawMapOverlays() so
on-screen and export rendering can never diverge.

Fixed a real bug found while testing: the toolbar button called exportMapImage()
synchronously from inside drawToolbar()'s active scissor mode (for its scroll
panel), clipping the export to a tiny corner. Now deferred via a pending flag
and run right after drawToolbar() returns.
2026-08-30 17:49:03 +02:00
56d74aba7b Add a clickable toolbar menu (raygui) alongside the existing keybindings
The app was 100% keyboard-driven (~40 single-key shortcuts dumped as a
dense text list in the HUD) -- this adds a discoverable, mouse-friendly
sidebar menu overlaying the top-right of the 3D globe, built with
raygui (raylib's official header-only widget library, fetched via
CMake FetchContent). Every existing keyboard shortcut keeps working
unchanged: 16 key-handler bodies were extracted from ViewerInput.cpp
into named Viewer methods so both the key and the matching toolbar
widget call the exact same code, and can never diverge.

Sections: a View Mode dropdown (replacing keys 1-0, expanding the old
6-key cycle into 4 explicit entries), Overlays (checkboxes), World/Time
(play/pause, step, fast-forward, a log-scaled speed slider, hydrology,
reseed, save/load), Civilization & Ecology, Live World, and Edit Mode.
Key F1 collapses/expands the sidebar (default expanded); a new
inToolbar input gate keeps interacting with it from also orbiting the
camera or picking a globe tile underneath, and it's disabled while the
Phase-3 modal prompt is up.

Found and fixed a real bug while building this: GuiCheckBox treats its
bounds as the checkbox glyph itself (raygui auto-positions the label
outside it), not a whole clickable row -- a naive full-row checkbox
call drew an oversized glyph with the label clipped off-panel.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TMfyZv91tonDnPJqbaTVJE
2026-08-30 17:17:40 +02:00