refactor(settings): rebuild the Window tab into three sections
This commit is contained in:
+6
-6
@@ -286,9 +286,7 @@ internal class HellionStrings
|
||||
internal static string Settings_Appearance_Colours_Heading => Get(nameof(Settings_Appearance_Colours_Heading));
|
||||
internal static string Settings_Appearance_Timestamps_Heading => Get(nameof(Settings_Appearance_Timestamps_Heading));
|
||||
|
||||
// Hellion Chat — Window-Tab section headings
|
||||
internal static string Settings_Window_Hide_Heading => Get(nameof(Settings_Window_Hide_Heading));
|
||||
internal static string Settings_Window_InactivityHide_Heading => Get(nameof(Settings_Window_InactivityHide_Heading));
|
||||
// Hellion Chat — Window-Tab section headings (pre-cycle legacy, kept for reference)
|
||||
internal static string Settings_Window_Frame_Heading => Get(nameof(Settings_Window_Frame_Heading));
|
||||
|
||||
// Hellion Chat — Chat-Tab SymbolPicker
|
||||
@@ -382,9 +380,6 @@ internal class HellionStrings
|
||||
internal static string Settings_DataManagement_DbViewer_Heading => Get(nameof(Settings_DataManagement_DbViewer_Heading));
|
||||
internal static string Settings_DataManagement_Advanced_Heading => Get(nameof(Settings_DataManagement_Advanced_Heading));
|
||||
|
||||
// Hellion Chat — v1.2.1 Window-tab Behaviour heading (replaces Frame heading)
|
||||
internal static string Settings_Window_Frame_Behaviour_Heading => Get(nameof(Settings_Window_Frame_Behaviour_Heading));
|
||||
|
||||
// Hellion Chat — v1.2.1 Migration v15 → v16 toast
|
||||
internal static string Migration_v16_OverrideStyle_Toast => Get(nameof(Migration_v16_OverrideStyle_Toast));
|
||||
|
||||
@@ -497,4 +492,9 @@ internal class HellionStrings
|
||||
internal static string Settings_Section_WindowStyle => Get(nameof(Settings_Section_WindowStyle));
|
||||
internal static string Settings_Section_Timestamps => Get(nameof(Settings_Section_Timestamps));
|
||||
internal static string Settings_Section_Animations => Get(nameof(Settings_Section_Animations));
|
||||
|
||||
// v1.5.6: Window tab collapsible section titles (R6)
|
||||
internal static string Settings_Section_Hide => Get(nameof(Settings_Section_Hide));
|
||||
internal static string Settings_Section_InactivityHide => Get(nameof(Settings_Section_InactivityHide));
|
||||
internal static string Settings_Section_Frame => Get(nameof(Settings_Section_Frame));
|
||||
}
|
||||
|
||||
@@ -610,13 +610,7 @@
|
||||
<value>Timestamps</value>
|
||||
</data>
|
||||
|
||||
<!-- Hellion Chat — Window tab section headings -->
|
||||
<data name="Settings_Window_Hide_Heading" xml:space="preserve">
|
||||
<value>Hiding</value>
|
||||
</data>
|
||||
<data name="Settings_Window_InactivityHide_Heading" xml:space="preserve">
|
||||
<value>Inactivity hiding</value>
|
||||
</data>
|
||||
<!-- Hellion Chat — Window tab section headings (pre-cycle legacy, kept for reference) -->
|
||||
<data name="Settings_Window_Frame_Heading" xml:space="preserve">
|
||||
<value>Window frame</value>
|
||||
</data>
|
||||
@@ -881,9 +875,6 @@
|
||||
<data name="Settings_DataManagement_Advanced_Heading" xml:space="preserve">
|
||||
<value>Advanced (Shift+click to open)</value>
|
||||
</data>
|
||||
<data name="Settings_Window_Frame_Behaviour_Heading" xml:space="preserve">
|
||||
<value>Behaviour</value>
|
||||
</data>
|
||||
<data name="Migration_v16_OverrideStyle_Toast" xml:space="preserve">
|
||||
<value>Hellion Chat 1.2.1 has reorganised the settings menu and removed the old "Override style" option (superseded by the theme system from 1.1.0). Your remaining settings are unchanged. Window transparency has been migrated to "Theme & Layout". A backup of the previous config is located at pluginConfigs/HellionChat.json.pre-v16-backup next to the active HellionChat.json.</value>
|
||||
</data>
|
||||
@@ -1156,4 +1147,15 @@
|
||||
<data name="Settings_Section_Animations" xml:space="preserve">
|
||||
<value>Animations</value>
|
||||
</data>
|
||||
|
||||
<!-- v1.5.6: Window tab collapsible section titles (R6) -->
|
||||
<data name="Settings_Section_Hide" xml:space="preserve">
|
||||
<value>Hide</value>
|
||||
</data>
|
||||
<data name="Settings_Section_InactivityHide" xml:space="preserve">
|
||||
<value>Hide when inactive</value>
|
||||
</data>
|
||||
<data name="Settings_Section_Frame" xml:space="preserve">
|
||||
<value>Frame</value>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -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