refactor(settings): rebuild the Window tab into three sections
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user