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.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user