fix(ui): commit FramebufferResize + ResetPanelLayout — orphaned during earlier cwd/sed shenanigans
These changes were referenced by commitsfc1e193/6273255/2818fcc/df9f2fdin their messages but the actual edits sat uncommitted in the working tree — caught by the pre-merge code review pass. Without this commit the merge to main would lose all the panel-layout fixes the user already live-verified. What was orphaned: · _window.FramebufferResize += OnFramebufferResize (Run() wiring) · OnFramebufferResize handler — updates GL viewport + camera aspect on window resize; force-resets panel layout via ResetPanelLayout. · ResetPanelLayout(ImGuiCond) — positions Vitals / Chat / Debug / Settings panels at sensible defaults relative to current window size. Called at startup with FirstUseEver (imgui.ini wins on later launches) and on FramebufferResize / View menu item with Always (force reset). · View → "Reset window layout" menu item. · OnLoad seeding ResetPanelLayout(FirstUseEver) after panel registration so first-launch users don't see all panels stacked at (0,0). · DisplaySettings.Default.Resolution: "1920x1080" → "1280x720" so the default matches the WindowOptions startup size — opening Display + Save without edits is a complete visual no-op (the alternative would have triggered an immediate resize on every first-time Save). dotnet build green; tests unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
df9f2fd3da
commit
944a0364c5
2 changed files with 102 additions and 4 deletions
|
|
@ -23,11 +23,14 @@ public sealed record DisplaySettings(
|
|||
bool ShowFps)
|
||||
{
|
||||
/// <summary>Values used on first launch / when settings.json is absent.
|
||||
/// FieldOfView (60°) and VSync (false) match the camera + window
|
||||
/// defaults that shipped before L.0, so opening Display + Save
|
||||
/// without touching anything is a visual no-op.</summary>
|
||||
/// All defaults pinned to the pre-L.0 runtime state — Resolution
|
||||
/// matches the WindowOptions startup size (1280×720), FieldOfView
|
||||
/// matches camera FovY (60°), VSync matches WindowOptions (false),
|
||||
/// ShowFps preserves the perf string in the title bar. Net effect:
|
||||
/// opening Display + Save without touching anything is a complete
|
||||
/// visual no-op.</summary>
|
||||
public static DisplaySettings Default { get; } = new(
|
||||
Resolution: "1920x1080",
|
||||
Resolution: "1280x720",
|
||||
Fullscreen: false,
|
||||
VSync: false,
|
||||
FieldOfView: 60f,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue