feat(settings): toggle for the symbol-picker chat-input button

Adds a Configuration property, defaulted to enabled, and a checkbox in
the Chat settings tab's Behaviour section. Strings live in HellionStrings
so DE/EN stays in sync. Defaults aligned with our 'discoverable by
default, hidden by user choice' convention. Schema stays at v17 — the
new boolean is additive, the default constructor covers existing configs.
This commit is contained in:
2026-05-16 10:05:37 +02:00
parent 0e470fcdce
commit 679b8f0f5e
6 changed files with 41 additions and 6 deletions
+2
View File
@@ -176,6 +176,7 @@ public class Configuration : IPluginConfiguration
public bool SortAutoTranslate;
public bool CollapseDuplicateMessages;
public bool CollapseKeepUniqueLinks;
public bool SymbolPickerEnabled = true;
public bool PlaySounds = true;
public bool KeepInputFocus = true;
public int MaxLinesToRender = 2_500; // 1-10000
@@ -270,6 +271,7 @@ public class Configuration : IPluginConfiguration
SortAutoTranslate = other.SortAutoTranslate;
CollapseDuplicateMessages = other.CollapseDuplicateMessages;
CollapseKeepUniqueLinks = other.CollapseKeepUniqueLinks;
SymbolPickerEnabled = other.SymbolPickerEnabled;
PlaySounds = other.PlaySounds;
KeepInputFocus = other.KeepInputFocus;
MaxLinesToRender = other.MaxLinesToRender;
+4
View File
@@ -270,6 +270,10 @@ internal class HellionStrings
internal static string Settings_Chat_Preview_Heading => Get(nameof(Settings_Chat_Preview_Heading));
internal static string Settings_Chat_Emotes_Heading => Get(nameof(Settings_Chat_Emotes_Heading));
// Hellion Chat — Chat-Tab SymbolPicker
internal static string Settings_Chat_SymbolPicker_Enable_Name => Get(nameof(Settings_Chat_SymbolPicker_Enable_Name));
internal static string Settings_Chat_SymbolPicker_Enable_Description => Get(nameof(Settings_Chat_SymbolPicker_Enable_Description));
// Hellion Chat — Database-Tab section headings
internal static string Settings_Database_Storage_Heading => Get(nameof(Settings_Database_Storage_Heading));
internal static string Settings_Database_Viewer_Heading => Get(nameof(Settings_Database_Viewer_Heading));
@@ -556,6 +556,14 @@
<value>Emotes</value>
</data>
<!-- Hellion Chat — Chat-Tab SymbolPicker -->
<data name="Settings_Chat_SymbolPicker_Enable_Name" xml:space="preserve">
<value>Symbol-Picker-Button neben dem Chat-Eingang anzeigen</value>
</data>
<data name="Settings_Chat_SymbolPicker_Enable_Description" xml:space="preserve">
<value>Fügt einen kleinen Button links neben dem Kanal-Indikator ein. Klick öffnet ein Popup mit FFXIV-Glyphen und einer kuratierten Symbol-Liste. Ausschalten für eine schlankere Eingabezeile.</value>
</data>
<!-- Hellion Chat — Sektions-Überschriften des Database-Tabs -->
<data name="Settings_Database_Storage_Heading" xml:space="preserve">
<value>Speicherung</value>
@@ -556,6 +556,14 @@
<value>Emotes</value>
</data>
<!-- Hellion Chat — Chat tab SymbolPicker -->
<data name="Settings_Chat_SymbolPicker_Enable_Name" xml:space="preserve">
<value>Show symbol-picker button next to chat input</value>
</data>
<data name="Settings_Chat_SymbolPicker_Enable_Description" xml:space="preserve">
<value>Adds a small button left of the channel indicator that opens a popup with FFXIV icons and a curated symbol list. Disable if you prefer a leaner input bar.</value>
</data>
<!-- Hellion Chat — Database tab section headings -->
<data name="Settings_Database_Storage_Heading" xml:space="preserve">
<value>Storage</value>
+7
View File
@@ -799,6 +799,8 @@ public sealed class ChatLogWindow : Window
// inside DrawAndConsume pins to the last rendered item, so the call MUST
// run immediately after this IconButton — placing it after the channel
// picker below would pin the popup under the wrong widget.
if (Plugin.Config.SymbolPickerEnabled)
{
if (ImGuiUtil.IconButton(
FontAwesomeIcon.Smile,
"symbol-picker-trigger",
@@ -806,6 +808,10 @@ public sealed class ChatLogWindow : Window
{
_symbolPicker.OpenPopup();
}
}
// DrawAndConsume runs unconditionally; with the button hidden the popup
// can't open, so the call is a no-op. Splice path stays outside the
// guard for the same reason.
var insertedSymbol = _symbolPicker.DrawAndConsume();
if (insertedSymbol is not null)
{
@@ -817,6 +823,7 @@ public sealed class ChatLogWindow : Window
Activate = true;
ActivatePos = pos + insertedSymbol.Length;
}
if (Plugin.Config.SymbolPickerEnabled)
ImGui.SameLine();
var beforeIcon = ImGui.GetCursorPos();
+6
View File
@@ -139,6 +139,12 @@ internal sealed class Chat : ISettingsTab
);
ImGuiUtil.HelpMarker(Language.Options_CollapseDuplicateMsgUniqueLink_Description);
}
ImGui.Checkbox(
HellionStrings.Settings_Chat_SymbolPicker_Enable_Name,
ref Mutable.SymbolPickerEnabled
);
ImGuiUtil.HelpMarker(HellionStrings.Settings_Chat_SymbolPicker_Enable_Description);
}
}