Repository navigation
Persist GUI settings - #1252
Persist GUI settings#1252
Conversation
|
⏱️ Benchmark run finished in 0m 32s 📈 Compared against baseline: 18s time, 1160 MB memory 🟢 Generation time is unchanged. 📅 Last benchmark: 2026-08-09 21:57:36 UTC You can retrigger the benchmark by commenting |
There was a problem hiding this comment.
Pull request overview
This PR adds a GUI settings persistence layer with per-setting “reset to default” controls and a global “reset all settings” action, while also fixing spawn-Y adjustment to use the post-rotation X/Z bounding box so terrain sampling is correct for rotated (and terrain-only) worlds.
Changes:
- Added
settings-store.jsto persist settings (via a single localStorage blob), inject per-setting revert buttons, and implement a two-step “reset all settings” flow. - Integrated the settings store into the GUI lifecycle (restore after
initSettings(), flush on modal close, and refresh UI state when controls are changed programmatically). - Updated spawn-Y postprocessing to use the post-rotation
XZBBox, and ensured terrain-only generation applies the same transform/rotation pipeline so the spawn point remains consistent.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/gui/locales/zh-CN.json | Adds localization strings for per-setting reset and global reset UI. |
| src/gui/locales/ua.json | Adds localization strings for per-setting reset and global reset UI. |
| src/gui/locales/sv.json | Adds localization strings for per-setting reset and global reset UI. |
| src/gui/locales/sl.json | Adds localization strings for per-setting reset and global reset UI. |
| src/gui/locales/ru.json | Adds localization strings for per-setting reset and global reset UI. |
| src/gui/locales/pt-BR.json | Adds localization strings for per-setting reset and global reset UI. |
| src/gui/locales/pl.json | Adds localization strings for per-setting reset and global reset UI. |
| src/gui/locales/lv.json | Adds localization strings for per-setting reset and global reset UI. |
| src/gui/locales/lt.json | Adds localization strings for per-setting reset and global reset UI. |
| src/gui/locales/ko.json | Adds localization strings for per-setting reset and global reset UI. |
| src/gui/locales/ja.json | Adds localization strings for per-setting reset and global reset UI. |
| src/gui/locales/hu.json | Adds localization strings for per-setting reset and global reset UI. |
| src/gui/locales/fr-FR.json | Adds localization strings for per-setting reset and global reset UI. |
| src/gui/locales/fi.json | Adds localization strings for per-setting reset and global reset UI. |
| src/gui/locales/es.json | Adds localization strings for per-setting reset and global reset UI. |
| src/gui/locales/en-US.json | Adds localization strings for per-setting reset and global reset UI. |
| src/gui/locales/de.json | Adds localization strings for per-setting reset and global reset UI. |
| src/gui/locales/ar.json | Adds localization strings for per-setting reset and global reset UI. |
| src/gui/js/settings-store.js | New module implementing settings persistence, revert buttons, and global reset behavior. |
| src/gui/js/main.js | Wires settings-store into startup/localization, flushes on modal close, and refreshes state on programmatic changes. |
| src/gui/index.html | Marks the segmented-control default and adds a “Reset all settings” row/button in the settings modal. |
| src/gui/css/styles.css | Styles the new reset button and per-setting revert icon/button (including focus/hover behavior). |
| src/gui.rs | Fixes spawn-Y update to use post-rotation XZBBox; applies transform/rotation in terrain-only mode for consistency. |
| src/data_processing.rs | Passes post-rotation xzbbox into spawn-Y adjustment (removes pre-rotation bbox reconstruction). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
No description provided.