From 1e418ab86f078259af95d051d68497b3972dac29 Mon Sep 17 00:00:00 2001 From: Jon Kazama Date: Mon, 18 May 2026 23:10:53 +0200 Subject: [PATCH] fix(ui): shrink wizard window and fold the Fox banner by default Smoke feedback v1.5.2 R1: the 900x560 default size dominated the screen and the centred MonoFont fox silhouette filled the welcome step. Default size drops to 720x480, MinimumSize to 600x400, so the wizard fits comfortably on a sub-monitor and still leaves the power-settings step readable when shrunk. Step 1 wraps the banner in a folded TreeNode (label "Hellion Forge", same anchor pattern the v1.5.1 wizard used) so the onboarding copy stays the primary focus and users opt into the silhouette explicitly. --- HellionChat/Ui/FirstRunWizard.cs | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/HellionChat/Ui/FirstRunWizard.cs b/HellionChat/Ui/FirstRunWizard.cs index 3fb46c5..8cf7e00 100644 --- a/HellionChat/Ui/FirstRunWizard.cs +++ b/HellionChat/Ui/FirstRunWizard.cs @@ -38,10 +38,10 @@ public sealed class FirstRunWizard : Window Flags = ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoDocking; SizeCondition = ImGuiCond.Appearing; - Size = new Vector2(900, 560); + Size = new Vector2(720, 480); SizeConstraints = new WindowSizeConstraints { - MinimumSize = new Vector2(720, 480), + MinimumSize = new Vector2(600, 400), MaximumSize = new Vector2(float.MaxValue, float.MaxValue), }; } @@ -150,15 +150,24 @@ public sealed class FirstRunWizard : Window ImGui.TextUnformatted(HellionStrings.Wizard_Step1_Title); ImGui.Spacing(); - using (Plugin.Interface.UiBuilder.MonoFontHandle.Push()) + // Banner is opt-in: the full silhouette dominates the wizard window + // at the default size, so the TreeNode is folded by default and the + // onboarding copy stays the primary focus. Mirrors the pre-rewrite + // collapsible anchor from v1.5.1. + using (var tree = ImRaii.TreeNode("Hellion Forge")) { - // Centre the banner across the available region. Spec Z.96 - // calls for a zentrierten Mono-Font-Block. CalcTextSize must - // run inside the MonoFont push so the measurement matches the - // glyph width actually used for rendering. - var bannerSize = ImGui.CalcTextSize(HellionForgeAscii.FoxBanner); - ImGui.SetCursorPosX((ImGui.GetContentRegionAvail().X - bannerSize.X) * 0.5f); - ImGui.TextUnformatted(HellionForgeAscii.FoxBanner); + if (tree.Success) + { + using (Plugin.Interface.UiBuilder.MonoFontHandle.Push()) + { + // CalcTextSize must run inside the MonoFont push so the + // measurement matches the glyph width actually used for + // rendering. + var bannerSize = ImGui.CalcTextSize(HellionForgeAscii.FoxBanner); + ImGui.SetCursorPosX((ImGui.GetContentRegionAvail().X - bannerSize.X) * 0.5f); + ImGui.TextUnformatted(HellionForgeAscii.FoxBanner); + } + } } ImGui.Spacing();