style(format): apply csharpier and markdownlint reflow
This commit is contained in:
@@ -196,6 +196,7 @@ public class Configuration : IPluginConfiguration
|
|||||||
public bool CollapseKeepUniqueLinks;
|
public bool CollapseKeepUniqueLinks;
|
||||||
public bool SymbolPickerEnabled = true;
|
public bool SymbolPickerEnabled = true;
|
||||||
public bool PlaySounds = true;
|
public bool PlaySounds = true;
|
||||||
|
|
||||||
// AUDIO-1: playback volume (0-1) for the three bundled custom sounds.
|
// AUDIO-1: playback volume (0-1) for the three bundled custom sounds.
|
||||||
public float CustomSoundVolume = 0.5f;
|
public float CustomSoundVolume = 0.5f;
|
||||||
|
|
||||||
|
|||||||
@@ -22,19 +22,21 @@ public enum NameFormMode
|
|||||||
|
|
||||||
public static class NameDisplayModeExt
|
public static class NameDisplayModeExt
|
||||||
{
|
{
|
||||||
public static string Name(this WorldSuffixMode mode) => mode switch
|
public static string Name(this WorldSuffixMode mode) =>
|
||||||
{
|
mode switch
|
||||||
WorldSuffixMode.Never => HellionStrings.NameDisplay_WorldSuffix_Never,
|
{
|
||||||
WorldSuffixMode.OtherWorldOnly => HellionStrings.NameDisplay_WorldSuffix_OtherWorldOnly,
|
WorldSuffixMode.Never => HellionStrings.NameDisplay_WorldSuffix_Never,
|
||||||
WorldSuffixMode.Always => HellionStrings.NameDisplay_WorldSuffix_Always,
|
WorldSuffixMode.OtherWorldOnly => HellionStrings.NameDisplay_WorldSuffix_OtherWorldOnly,
|
||||||
_ => mode.ToString(),
|
WorldSuffixMode.Always => HellionStrings.NameDisplay_WorldSuffix_Always,
|
||||||
};
|
_ => mode.ToString(),
|
||||||
|
};
|
||||||
|
|
||||||
public static string Name(this NameFormMode mode) => mode switch
|
public static string Name(this NameFormMode mode) =>
|
||||||
{
|
mode switch
|
||||||
NameFormMode.Full => HellionStrings.NameDisplay_NameForm_Full,
|
{
|
||||||
NameFormMode.FirstNameOnly => HellionStrings.NameDisplay_NameForm_FirstNameOnly,
|
NameFormMode.Full => HellionStrings.NameDisplay_NameForm_Full,
|
||||||
NameFormMode.Initials => HellionStrings.NameDisplay_NameForm_Initials,
|
NameFormMode.FirstNameOnly => HellionStrings.NameDisplay_NameForm_FirstNameOnly,
|
||||||
_ => mode.ToString(),
|
NameFormMode.Initials => HellionStrings.NameDisplay_NameForm_Initials,
|
||||||
};
|
_ => mode.ToString(),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,20 +90,27 @@ public sealed class ChatInputBar
|
|||||||
|
|
||||||
// UI-11: disclosure warning, visible only while an armed buffer is held
|
// UI-11: disclosure warning, visible only while an armed buffer is held
|
||||||
// unchanged. Editing the buffer clears the condition automatically.
|
// unchanged. Editing the buffer clears the condition automatically.
|
||||||
if (Plugin.Config.NotifyPluginDisclosure
|
if (
|
||||||
|
Plugin.Config.NotifyPluginDisclosure
|
||||||
&& _disclosureArmedBuffer is not null
|
&& _disclosureArmedBuffer is not null
|
||||||
&& _state.Buffer == _disclosureArmedBuffer)
|
&& _state.Buffer == _disclosureArmedBuffer
|
||||||
|
)
|
||||||
{
|
{
|
||||||
ImGui.TextColored(ImGuiColors.DalamudYellow, HellionStrings.ChatInput_PluginDisclosure_Warning);
|
ImGui.TextColored(
|
||||||
|
ImGuiColors.DalamudYellow,
|
||||||
|
HellionStrings.ChatInput_PluginDisclosure_Warning
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TEST-MIRROR: ../_Helpers/CompactInputSubmitter.cs
|
// TEST-MIRROR: ../_Helpers/CompactInputSubmitter.cs
|
||||||
private void SubmitCompact(Tab tab)
|
private void SubmitCompact(Tab tab)
|
||||||
{
|
{
|
||||||
if (Plugin.Config.NotifyPluginDisclosure
|
if (
|
||||||
|
Plugin.Config.NotifyPluginDisclosure
|
||||||
&& _state.Buffer != _disclosureArmedBuffer
|
&& _state.Buffer != _disclosureArmedBuffer
|
||||||
&& PluginDisclosureScanner.ContainsPrivateUseGlyph(_state.Buffer))
|
&& PluginDisclosureScanner.ContainsPrivateUseGlyph(_state.Buffer)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// First send attempt on this exact buffer: arm and hold. The buffer
|
// First send attempt on this exact buffer: arm and hold. The buffer
|
||||||
// is kept, the warning renders, the user can press Enter again.
|
// is kept, the warning renders, the user can press Enter again.
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ using System.Runtime.InteropServices;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using Dalamud.Bindings.ImGui;
|
using Dalamud.Bindings.ImGui;
|
||||||
using Dalamud.Game.Addon.Lifecycle;
|
using Dalamud.Game.Addon.Lifecycle;
|
||||||
using Dalamud.Interface.Colors;
|
|
||||||
using Dalamud.Game.Text.SeStringHandling;
|
using Dalamud.Game.Text.SeStringHandling;
|
||||||
using Dalamud.Game.Text.SeStringHandling.Payloads;
|
using Dalamud.Game.Text.SeStringHandling.Payloads;
|
||||||
using Dalamud.Interface;
|
using Dalamud.Interface;
|
||||||
|
using Dalamud.Interface.Colors;
|
||||||
using Dalamud.Interface.Style;
|
using Dalamud.Interface.Style;
|
||||||
using Dalamud.Interface.Utility;
|
using Dalamud.Interface.Utility;
|
||||||
using Dalamud.Interface.Utility.Raii;
|
using Dalamud.Interface.Utility.Raii;
|
||||||
@@ -721,9 +721,7 @@ public sealed class ChatLogWindow : Window
|
|||||||
// Window.IsFocused holds last frame's RootAndChildWindows focus, set
|
// Window.IsFocused holds last frame's RootAndChildWindows focus, set
|
||||||
// by Dalamud's WindowHost after Begin(). One-frame latency is
|
// by Dalamud's WindowHost after Begin(). One-frame latency is
|
||||||
// accepted.
|
// accepted.
|
||||||
BgAlpha = IsFocused
|
BgAlpha = IsFocused ? Plugin.Config.WindowOpacity : Plugin.Config.WindowOpacityInactive;
|
||||||
? Plugin.Config.WindowOpacity
|
|
||||||
: Plugin.Config.WindowOpacityInactive;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LastViewport = ImGui.GetWindowViewport().Handle;
|
LastViewport = ImGui.GetWindowViewport().Handle;
|
||||||
@@ -1101,9 +1099,11 @@ public sealed class ChatLogWindow : Window
|
|||||||
|
|
||||||
if (ImGui.IsKeyDown(ImGuiKey.Enter) || ImGui.IsKeyDown(ImGuiKey.KeypadEnter))
|
if (ImGui.IsKeyDown(ImGuiKey.Enter) || ImGui.IsKeyDown(ImGuiKey.KeypadEnter))
|
||||||
{
|
{
|
||||||
if (Plugin.Config.NotifyPluginDisclosure
|
if (
|
||||||
|
Plugin.Config.NotifyPluginDisclosure
|
||||||
&& Chat != _disclosureArmedBufferMain
|
&& Chat != _disclosureArmedBufferMain
|
||||||
&& PluginDisclosureScanner.ContainsPrivateUseGlyph(Chat))
|
&& PluginDisclosureScanner.ContainsPrivateUseGlyph(Chat)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
// First send attempt on this exact buffer: arm and hold.
|
// First send attempt on this exact buffer: arm and hold.
|
||||||
// The warning renders below the input.
|
// The warning renders below the input.
|
||||||
@@ -1127,11 +1127,16 @@ public sealed class ChatLogWindow : Window
|
|||||||
// UI-11: disclosure warning for the main-window input, mirrors the
|
// UI-11: disclosure warning for the main-window input, mirrors the
|
||||||
// ChatInputBar path. Visible only while the armed buffer is held
|
// ChatInputBar path. Visible only while the armed buffer is held
|
||||||
// unchanged; editing the buffer clears the condition.
|
// unchanged; editing the buffer clears the condition.
|
||||||
if (Plugin.Config.NotifyPluginDisclosure
|
if (
|
||||||
|
Plugin.Config.NotifyPluginDisclosure
|
||||||
&& _disclosureArmedBufferMain is not null
|
&& _disclosureArmedBufferMain is not null
|
||||||
&& Chat == _disclosureArmedBufferMain)
|
&& Chat == _disclosureArmedBufferMain
|
||||||
|
)
|
||||||
{
|
{
|
||||||
ImGui.TextColored(ImGuiColors.DalamudYellow, HellionStrings.ChatInput_PluginDisclosure_Warning);
|
ImGui.TextColored(
|
||||||
|
ImGuiColors.DalamudYellow,
|
||||||
|
HellionStrings.ChatInput_PluginDisclosure_Warning
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process keybinds that have modifiers while the chat is focused.
|
// Process keybinds that have modifiers while the chat is focused.
|
||||||
|
|||||||
@@ -21,8 +21,7 @@ internal sealed class Appearance : ISettingsTab
|
|||||||
|
|
||||||
private string? _applyDismissedFor;
|
private string? _applyDismissedFor;
|
||||||
|
|
||||||
public string Name =>
|
public string Name => HellionStrings.Settings_Tab_Appearance + "###tabs-appearance";
|
||||||
HellionStrings.Settings_Tab_Appearance + "###tabs-appearance";
|
|
||||||
|
|
||||||
internal Appearance(Plugin plugin, Configuration mutable, ILogger<Appearance> logger)
|
internal Appearance(Plugin plugin, Configuration mutable, ILogger<Appearance> logger)
|
||||||
{
|
{
|
||||||
@@ -50,7 +49,8 @@ internal sealed class Appearance : ISettingsTab
|
|||||||
|
|
||||||
private void DrawThemeSection(bool sectionJustEntered)
|
private void DrawThemeSection(bool sectionJustEntered)
|
||||||
{
|
{
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Theme);
|
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Theme);
|
||||||
if (!tree.Success)
|
if (!tree.Success)
|
||||||
return;
|
return;
|
||||||
@@ -248,7 +248,8 @@ internal sealed class Appearance : ISettingsTab
|
|||||||
|
|
||||||
private void DrawFontsSection(bool sectionJustEntered)
|
private void DrawFontsSection(bool sectionJustEntered)
|
||||||
{
|
{
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Fonts);
|
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Fonts);
|
||||||
if (!tree.Success)
|
if (!tree.Success)
|
||||||
return;
|
return;
|
||||||
@@ -407,7 +408,8 @@ internal sealed class Appearance : ISettingsTab
|
|||||||
|
|
||||||
private void DrawColoursSection(bool sectionJustEntered)
|
private void DrawColoursSection(bool sectionJustEntered)
|
||||||
{
|
{
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Colours);
|
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Colours);
|
||||||
if (!tree.Success)
|
if (!tree.Success)
|
||||||
return;
|
return;
|
||||||
@@ -535,7 +537,8 @@ internal sealed class Appearance : ISettingsTab
|
|||||||
|
|
||||||
private void DrawWindowStyleSection(bool sectionJustEntered)
|
private void DrawWindowStyleSection(bool sectionJustEntered)
|
||||||
{
|
{
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_WindowStyle);
|
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_WindowStyle);
|
||||||
if (!tree.Success)
|
if (!tree.Success)
|
||||||
return;
|
return;
|
||||||
@@ -616,7 +619,9 @@ internal sealed class Appearance : ISettingsTab
|
|||||||
{
|
{
|
||||||
Mutable.WindowOpacityInactive = inactiveOpacityPercent / 100f;
|
Mutable.WindowOpacityInactive = inactiveOpacityPercent / 100f;
|
||||||
}
|
}
|
||||||
ImGuiUtil.HelpMarker(HellionStrings.Settings_ThemeAndLayout_WindowOpacityInactive_Description);
|
ImGuiUtil.HelpMarker(
|
||||||
|
HellionStrings.Settings_ThemeAndLayout_WindowOpacityInactive_Description
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -624,7 +629,8 @@ internal sealed class Appearance : ISettingsTab
|
|||||||
|
|
||||||
private void DrawTimestampSection(bool sectionJustEntered)
|
private void DrawTimestampSection(bool sectionJustEntered)
|
||||||
{
|
{
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Timestamps);
|
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Timestamps);
|
||||||
if (!tree.Success)
|
if (!tree.Success)
|
||||||
return;
|
return;
|
||||||
@@ -667,7 +673,8 @@ internal sealed class Appearance : ISettingsTab
|
|||||||
|
|
||||||
private void DrawAnimationsSection(bool sectionJustEntered)
|
private void DrawAnimationsSection(bool sectionJustEntered)
|
||||||
{
|
{
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Animations);
|
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Animations);
|
||||||
if (!tree.Success)
|
if (!tree.Success)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -57,7 +57,8 @@ internal sealed class Chat : ISettingsTab
|
|||||||
|
|
||||||
private void DrawMessagesSection(bool sectionJustEntered)
|
private void DrawMessagesSection(bool sectionJustEntered)
|
||||||
{
|
{
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Messages);
|
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Messages);
|
||||||
if (!tree.Success)
|
if (!tree.Success)
|
||||||
return;
|
return;
|
||||||
@@ -135,7 +136,8 @@ internal sealed class Chat : ISettingsTab
|
|||||||
|
|
||||||
private void DrawInputPreviewSection(bool sectionJustEntered)
|
private void DrawInputPreviewSection(bool sectionJustEntered)
|
||||||
{
|
{
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_InputPreview);
|
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_InputPreview);
|
||||||
if (!tree.Success)
|
if (!tree.Success)
|
||||||
return;
|
return;
|
||||||
@@ -185,7 +187,8 @@ internal sealed class Chat : ISettingsTab
|
|||||||
|
|
||||||
private void DrawAutoTellTabsSection(bool sectionJustEntered)
|
private void DrawAutoTellTabsSection(bool sectionJustEntered)
|
||||||
{
|
{
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_AutoTellTabs);
|
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_AutoTellTabs);
|
||||||
if (!tree.Success)
|
if (!tree.Success)
|
||||||
return;
|
return;
|
||||||
@@ -254,7 +257,8 @@ internal sealed class Chat : ISettingsTab
|
|||||||
|
|
||||||
private void DrawEmotesSection(bool sectionJustEntered)
|
private void DrawEmotesSection(bool sectionJustEntered)
|
||||||
{
|
{
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Emotes);
|
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Emotes);
|
||||||
if (!tree.Success)
|
if (!tree.Success)
|
||||||
return;
|
return;
|
||||||
@@ -369,7 +373,8 @@ internal sealed class Chat : ISettingsTab
|
|||||||
|
|
||||||
private void DrawLinksTooltipsSection(bool sectionJustEntered)
|
private void DrawLinksTooltipsSection(bool sectionJustEntered)
|
||||||
{
|
{
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_LinksTooltips);
|
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_LinksTooltips);
|
||||||
if (!tree.Success)
|
if (!tree.Success)
|
||||||
return;
|
return;
|
||||||
@@ -403,7 +408,8 @@ internal sealed class Chat : ISettingsTab
|
|||||||
|
|
||||||
private void DrawNoviceNetworkSection(bool sectionJustEntered)
|
private void DrawNoviceNetworkSection(bool sectionJustEntered)
|
||||||
{
|
{
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_NoviceNetwork);
|
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_NoviceNetwork);
|
||||||
if (!tree.Success)
|
if (!tree.Success)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -152,22 +152,28 @@ internal sealed class DataAndPrivacy : ISettingsTab
|
|||||||
if (sectionJustEntered)
|
if (sectionJustEntered)
|
||||||
ShowAdvanced = ImGui.GetIO().KeyShift;
|
ShowAdvanced = ImGui.GetIO().KeyShift;
|
||||||
|
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
DrawPrivacyFilterSection();
|
DrawPrivacyFilterSection();
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
DrawStorageSection();
|
DrawStorageSection();
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
DrawRetentionSection();
|
DrawRetentionSection();
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
DrawCleanupSection();
|
DrawCleanupSection();
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
DrawExportSection();
|
DrawExportSection();
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
DrawDatabaseSection();
|
DrawDatabaseSection();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -960,7 +966,9 @@ internal sealed class DataAndPrivacy : ISettingsTab
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
using var advTree = ImRaii.TreeNode(HellionStrings.Settings_DataManagement_Advanced_Heading);
|
using var advTree = ImRaii.TreeNode(
|
||||||
|
HellionStrings.Settings_DataManagement_Advanced_Heading
|
||||||
|
);
|
||||||
if (!advTree.Success)
|
if (!advTree.Success)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ internal sealed class General : ISettingsTab
|
|||||||
private void DrawInputSection(bool sectionJustEntered)
|
private void DrawInputSection(bool sectionJustEntered)
|
||||||
{
|
{
|
||||||
// Collapse every time the tab is freshly entered so state doesn't bleed across sessions.
|
// Collapse every time the tab is freshly entered so state doesn't bleed across sessions.
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Input);
|
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Input);
|
||||||
if (!tree.Success)
|
if (!tree.Success)
|
||||||
return;
|
return;
|
||||||
@@ -86,7 +87,8 @@ internal sealed class General : ISettingsTab
|
|||||||
private void DrawSoundSection(bool sectionJustEntered)
|
private void DrawSoundSection(bool sectionJustEntered)
|
||||||
{
|
{
|
||||||
// Collapse every time the tab is freshly entered so state doesn't bleed across sessions.
|
// Collapse every time the tab is freshly entered so state doesn't bleed across sessions.
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Sound);
|
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Sound);
|
||||||
if (!tree.Success)
|
if (!tree.Success)
|
||||||
return;
|
return;
|
||||||
@@ -113,14 +115,19 @@ internal sealed class General : ISettingsTab
|
|||||||
Mutable.CustomSoundVolume = customSoundVolumePercent / 100f;
|
Mutable.CustomSoundVolume = customSoundVolumePercent / 100f;
|
||||||
}
|
}
|
||||||
// Show the functional description and the per-tab navigation hint together.
|
// Show the functional description and the per-tab navigation hint together.
|
||||||
ImGuiUtil.HelpMarker(HellionStrings.Settings_General_CustomSoundVolume_Description + "\n\n" + HellionStrings.Settings_Section_Sound_TabsHint);
|
ImGuiUtil.HelpMarker(
|
||||||
|
HellionStrings.Settings_General_CustomSoundVolume_Description
|
||||||
|
+ "\n\n"
|
||||||
|
+ HellionStrings.Settings_Section_Sound_TabsHint
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawLanguageSection(bool sectionJustEntered)
|
private void DrawLanguageSection(bool sectionJustEntered)
|
||||||
{
|
{
|
||||||
// Collapse every time the tab is freshly entered so state doesn't bleed across sessions.
|
// Collapse every time the tab is freshly entered so state doesn't bleed across sessions.
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Language);
|
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Language);
|
||||||
if (!tree.Success)
|
if (!tree.Success)
|
||||||
return;
|
return;
|
||||||
@@ -191,7 +198,8 @@ internal sealed class General : ISettingsTab
|
|||||||
private void DrawPerformanceSection(bool sectionJustEntered)
|
private void DrawPerformanceSection(bool sectionJustEntered)
|
||||||
{
|
{
|
||||||
// Collapse every time the tab is freshly entered so state doesn't bleed across sessions.
|
// Collapse every time the tab is freshly entered so state doesn't bleed across sessions.
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Performance);
|
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Performance);
|
||||||
if (!tree.Success)
|
if (!tree.Success)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -177,8 +177,13 @@ internal sealed class Tabs : ISettingsTab
|
|||||||
|
|
||||||
// ── Sub-section: Channels ─────────────────────────────────────────
|
// ── Sub-section: Channels ─────────────────────────────────────────
|
||||||
// First because it answers "what does this tab collect?" — most important.
|
// First because it answers "what does this tab collect?" — most important.
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
using (var secChannels = ImRaii.TreeNode(HellionStrings.Settings_Section_Tab_Channels + $"##sec-channels-{i}"))
|
ImGui.SetNextItemOpen(false);
|
||||||
|
using (
|
||||||
|
var secChannels = ImRaii.TreeNode(
|
||||||
|
HellionStrings.Settings_Section_Tab_Channels + $"##sec-channels-{i}"
|
||||||
|
)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (secChannels.Success)
|
if (secChannels.Success)
|
||||||
{
|
{
|
||||||
@@ -195,8 +200,13 @@ internal sealed class Tabs : ISettingsTab
|
|||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
|
|
||||||
// ── Sub-section: Display ──────────────────────────────────────────
|
// ── Sub-section: Display ──────────────────────────────────────────
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
using (var secDisplay = ImRaii.TreeNode(HellionStrings.Settings_Section_Tab_Display + $"##sec-display-{i}"))
|
ImGui.SetNextItemOpen(false);
|
||||||
|
using (
|
||||||
|
var secDisplay = ImRaii.TreeNode(
|
||||||
|
HellionStrings.Settings_Section_Tab_Display + $"##sec-display-{i}"
|
||||||
|
)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (secDisplay.Success)
|
if (secDisplay.Success)
|
||||||
{
|
{
|
||||||
@@ -226,15 +236,23 @@ internal sealed class Tabs : ISettingsTab
|
|||||||
|
|
||||||
// Only relevant when the global hide-when-inactive is on.
|
// Only relevant when the global hide-when-inactive is on.
|
||||||
if (Mutable.HideWhenInactive)
|
if (Mutable.HideWhenInactive)
|
||||||
ImGui.Checkbox(Language.Options_Tabs_InactivityBehaviour, ref tab.UnhideOnActivity);
|
ImGui.Checkbox(
|
||||||
|
Language.Options_Tabs_InactivityBehaviour,
|
||||||
|
ref tab.UnhideOnActivity
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
|
|
||||||
// ── Sub-section: Notification ─────────────────────────────────────
|
// ── Sub-section: Notification ─────────────────────────────────────
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
using (var secNotif = ImRaii.TreeNode(HellionStrings.Settings_Section_Tab_Notification + $"##sec-notif-{i}"))
|
ImGui.SetNextItemOpen(false);
|
||||||
|
using (
|
||||||
|
var secNotif = ImRaii.TreeNode(
|
||||||
|
HellionStrings.Settings_Section_Tab_Notification + $"##sec-notif-{i}"
|
||||||
|
)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (secNotif.Success)
|
if (secNotif.Success)
|
||||||
{
|
{
|
||||||
@@ -308,7 +326,10 @@ internal sealed class Tabs : ISettingsTab
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Plugin.CustomAudioPlayer.Play((int)previewId - 16, Mutable.CustomSoundVolume);
|
Plugin.CustomAudioPlayer.Play(
|
||||||
|
(int)previewId - 16,
|
||||||
|
Mutable.CustomSoundVolume
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -340,15 +361,24 @@ internal sealed class Tabs : ISettingsTab
|
|||||||
Mutable.CustomSoundVolume = customSoundVolumePercent / 100f;
|
Mutable.CustomSoundVolume = customSoundVolumePercent / 100f;
|
||||||
}
|
}
|
||||||
// Applies globally — same value as in General → Sound.
|
// Applies globally — same value as in General → Sound.
|
||||||
ImGuiUtil.HelpMarker(HellionStrings.Settings_General_CustomSoundVolume_Description + "\n\n" + HellionStrings.Settings_Section_Tab_Volume_AllTabsHint);
|
ImGuiUtil.HelpMarker(
|
||||||
|
HellionStrings.Settings_General_CustomSoundVolume_Description
|
||||||
|
+ "\n\n"
|
||||||
|
+ HellionStrings.Settings_Section_Tab_Volume_AllTabsHint
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
|
|
||||||
// ── Sub-section: Input ────────────────────────────────────────────
|
// ── Sub-section: Input ────────────────────────────────────────────
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
using (var secInput = ImRaii.TreeNode(HellionStrings.Settings_Section_Tab_Input + $"##sec-input-{i}"))
|
ImGui.SetNextItemOpen(false);
|
||||||
|
using (
|
||||||
|
var secInput = ImRaii.TreeNode(
|
||||||
|
HellionStrings.Settings_Section_Tab_Input + $"##sec-input-{i}"
|
||||||
|
)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (secInput.Success)
|
if (secInput.Success)
|
||||||
{
|
{
|
||||||
@@ -358,7 +388,8 @@ internal sealed class Tabs : ISettingsTab
|
|||||||
if (!tab.InputDisabled)
|
if (!tab.InputDisabled)
|
||||||
{
|
{
|
||||||
var input =
|
var input =
|
||||||
tab.Channel?.ToChatType().Name() ?? Language.Options_Tabs_NoInputChannel;
|
tab.Channel?.ToChatType().Name()
|
||||||
|
?? Language.Options_Tabs_NoInputChannel;
|
||||||
using (
|
using (
|
||||||
var combo = ImGuiUtil.BeginComboVertical(
|
var combo = ImGuiUtil.BeginComboVertical(
|
||||||
Language.Options_Tabs_InputChannel,
|
Language.Options_Tabs_InputChannel,
|
||||||
@@ -390,7 +421,10 @@ internal sealed class Tabs : ISettingsTab
|
|||||||
var player = Plugin.ObjectTable.LocalPlayer;
|
var player = Plugin.ObjectTable.LocalPlayer;
|
||||||
if (tab.Channel == InputChannel.Tell && player != null)
|
if (tab.Channel == InputChannel.Tell && player != null)
|
||||||
{
|
{
|
||||||
ImGui.Checkbox(Language.Options_Tabs_SenderMessages, ref tab.AllSenderMessages);
|
ImGui.Checkbox(
|
||||||
|
Language.Options_Tabs_SenderMessages,
|
||||||
|
ref tab.AllSenderMessages
|
||||||
|
);
|
||||||
ImGuiUtil.HelpText(Language.Options_Help_SenderMessages);
|
ImGuiUtil.HelpText(Language.Options_Help_SenderMessages);
|
||||||
|
|
||||||
var worlds = Sheets
|
var worlds = Sheets
|
||||||
@@ -444,7 +478,9 @@ internal sealed class Tabs : ISettingsTab
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
selectedWorld = idx;
|
selectedWorld = idx;
|
||||||
tab.TellTarget.World = worlds[selectedWorld].RowId;
|
tab.TellTarget.World = worlds[
|
||||||
|
selectedWorld
|
||||||
|
].RowId;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lastDc == world.DataCenter.RowId)
|
if (lastDc == world.DataCenter.RowId)
|
||||||
@@ -474,8 +510,13 @@ internal sealed class Tabs : ISettingsTab
|
|||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
|
|
||||||
// ── Sub-section: Pop-out window ───────────────────────────────────
|
// ── Sub-section: Pop-out window ───────────────────────────────────
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
using (var secPopOut = ImRaii.TreeNode(HellionStrings.Settings_Section_Tab_PopOut + $"##sec-popout-{i}"))
|
ImGui.SetNextItemOpen(false);
|
||||||
|
using (
|
||||||
|
var secPopOut = ImRaii.TreeNode(
|
||||||
|
HellionStrings.Settings_Section_Tab_PopOut + $"##sec-popout-{i}"
|
||||||
|
)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (secPopOut.Success)
|
if (secPopOut.Success)
|
||||||
{
|
{
|
||||||
@@ -500,7 +541,10 @@ internal sealed class Tabs : ISettingsTab
|
|||||||
ImGuiSliderFlags.AlwaysClamp
|
ImGuiSliderFlags.AlwaysClamp
|
||||||
);
|
);
|
||||||
|
|
||||||
ImGui.Checkbox(Language.Options_Tabs_IndependentHide, ref tab.IndependentHide);
|
ImGui.Checkbox(
|
||||||
|
Language.Options_Tabs_IndependentHide,
|
||||||
|
ref tab.IndependentHide
|
||||||
|
);
|
||||||
if (tab.IndependentHide)
|
if (tab.IndependentHide)
|
||||||
{
|
{
|
||||||
using var __ = ImRaii.PushIndent(10.0f);
|
using var __ = ImRaii.PushIndent(10.0f);
|
||||||
|
|||||||
@@ -29,7 +29,8 @@ internal sealed class Window : ISettingsTab
|
|||||||
|
|
||||||
private void DrawHideSection(bool sectionJustEntered)
|
private void DrawHideSection(bool sectionJustEntered)
|
||||||
{
|
{
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Hide);
|
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Hide);
|
||||||
if (!tree.Success)
|
if (!tree.Success)
|
||||||
{
|
{
|
||||||
@@ -83,7 +84,8 @@ internal sealed class Window : ISettingsTab
|
|||||||
|
|
||||||
private void DrawInactivityHideSection(bool sectionJustEntered)
|
private void DrawInactivityHideSection(bool sectionJustEntered)
|
||||||
{
|
{
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_InactivityHide);
|
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_InactivityHide);
|
||||||
if (!tree.Success)
|
if (!tree.Success)
|
||||||
{
|
{
|
||||||
@@ -166,7 +168,8 @@ internal sealed class Window : ISettingsTab
|
|||||||
|
|
||||||
private void DrawFrameSection(bool sectionJustEntered)
|
private void DrawFrameSection(bool sectionJustEntered)
|
||||||
{
|
{
|
||||||
if (sectionJustEntered) ImGui.SetNextItemOpen(false);
|
if (sectionJustEntered)
|
||||||
|
ImGui.SetNextItemOpen(false);
|
||||||
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Frame);
|
using var tree = ImRaii.TreeNode(HellionStrings.Settings_Section_Frame);
|
||||||
if (!tree.Success)
|
if (!tree.Success)
|
||||||
{
|
{
|
||||||
@@ -192,5 +195,4 @@ internal sealed class Window : ISettingsTab
|
|||||||
ImGuiUtil.HelpMarker(HellionStrings.Settings_Window_ResetPosition_Description);
|
ImGuiUtil.HelpMarker(HellionStrings.Settings_Window_ResetPosition_Description);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,12 @@ internal static class SenderNameDisplay
|
|||||||
var isHomeWorld = payload.World.RowId == Plugin.PlayerState.HomeWorld.RowId;
|
var isHomeWorld = payload.World.RowId == Plugin.PlayerState.HomeWorld.RowId;
|
||||||
|
|
||||||
var formatted = SenderNameFormatter.Format(
|
var formatted = SenderNameFormatter.Format(
|
||||||
payload.PlayerName, worldName, isHomeWorld, formMode, suffixMode);
|
payload.PlayerName,
|
||||||
|
worldName,
|
||||||
|
isHomeWorld,
|
||||||
|
formMode,
|
||||||
|
suffixMode
|
||||||
|
);
|
||||||
|
|
||||||
// Render-only copy: replace the whole sender span (name text, world
|
// Render-only copy: replace the whole sender span (name text, world
|
||||||
// text, and any cross-world icon) with one formatted chunk that keeps
|
// text, and any cross-world icon) with one formatted chunk that keeps
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ public static class SenderNameFormatter
|
|||||||
string worldName,
|
string worldName,
|
||||||
bool isHomeWorld,
|
bool isHomeWorld,
|
||||||
NameFormMode formMode,
|
NameFormMode formMode,
|
||||||
WorldSuffixMode suffixMode)
|
WorldSuffixMode suffixMode
|
||||||
|
)
|
||||||
{
|
{
|
||||||
var name = FormatName(fullName, formMode);
|
var name = FormatName(fullName, formMode);
|
||||||
|
|
||||||
@@ -26,9 +27,7 @@ public static class SenderNameFormatter
|
|||||||
_ => !isHomeWorld,
|
_ => !isHomeWorld,
|
||||||
};
|
};
|
||||||
|
|
||||||
return showWorld && !string.IsNullOrEmpty(worldName)
|
return showWorld && !string.IsNullOrEmpty(worldName) ? $"{name}@{worldName}" : name;
|
||||||
? $"{name}@{worldName}"
|
|
||||||
: name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string FormatName(string fullName, NameFormMode mode)
|
private static string FormatName(string fullName, NameFormMode mode)
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ Channels, Data & Privacy, About). Each tab uses collapsible sections grouped by
|
|||||||
type; sections start collapsed on every tab-open.
|
type; sections start collapsed on every tab-open.
|
||||||
|
|
||||||
Delivered from the originally-planned v1.5.5b bundle:
|
Delivered from the originally-planned v1.5.5b bundle:
|
||||||
|
|
||||||
- **UI-7** — Sender-name display options: world-suffix mode (Never / Other worlds only / Always)
|
- **UI-7** — Sender-name display options: world-suffix mode (Never / Other worlds only / Always)
|
||||||
and name-format mode (Full name / First name only / Initials). Lives in Chat → Messages.
|
and name-format mode (Full name / First name only / Initials). Lives in Chat → Messages.
|
||||||
- **UI-11** — Pre-send warning when a message contains plugin-only symbols. Toggle in
|
- **UI-11** — Pre-send warning when a message contains plugin-only symbols. Toggle in
|
||||||
|
|||||||
Reference in New Issue
Block a user