Persist the "Debug details" toggle in the layout .ini

The View-menu verbosity switch reset to off on every launch. Register a
custom ImGui settings handler (a [CoopUI][State] section in coop_layout.ini,
alongside the window layout) so the operator's choice survives restarts.
Toggling it marks settings dirty so ImGui's auto-save writes it back.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-21 23:59:03 +02:00
parent 7264cb2ef4
commit 699ca31d31
3 changed files with 68 additions and 1 deletions

View File

@@ -152,6 +152,9 @@ int run()
bool show_overlay = true;
double overlay_hidden_at = 0.0;
coop::UiState ui;
// Persist the "Debug details" verbosity in the .ini. Register before the first
// begin_frame() below, which is when ImGui loads the .ini and replays our handler.
coop::register_ui_settings(ui);
coop::FrameStats stats;
// Frame-sync: the hook generation we last presented (so we wait for the next one).