refactor(settings): rebuild the Window tab into three sections

This commit is contained in:
2026-05-23 01:30:41 +02:00
parent d3cea8c6c0
commit 78efd654e6
3 changed files with 30 additions and 25 deletions
+12 -9
View File
@@ -20,16 +20,17 @@ internal sealed class Window : ISettingsTab
public void Draw(bool sectionJustEntered)
{
DrawHideSection();
DrawHideSection(sectionJustEntered);
ImGui.Spacing();
DrawInactivityHideSection();
DrawInactivityHideSection(sectionJustEntered);
ImGui.Spacing();
DrawFrameSection();
DrawFrameSection(sectionJustEntered);
}
private void DrawHideSection()
private void DrawHideSection(bool sectionJustEntered)
{
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Window_Hide_Heading);
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Hide);
if (!tree.Success)
{
return;
@@ -80,9 +81,10 @@ internal sealed class Window : ISettingsTab
}
}
private void DrawInactivityHideSection()
private void DrawInactivityHideSection(bool sectionJustEntered)
{
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Window_InactivityHide_Heading);
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_InactivityHide);
if (!tree.Success)
{
return;
@@ -162,9 +164,10 @@ internal sealed class Window : ISettingsTab
}
}
private void DrawFrameSection()
private void DrawFrameSection(bool sectionJustEntered)
{
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Window_Frame_Behaviour_Heading);
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Frame);
if (!tree.Success)
{
return;