From 679b8f0f5e62fd33904aa8f43590e95f83f3b7c9 Mon Sep 17 00:00:00 2001 From: Jon Kazama Date: Sat, 16 May 2026 10:05:37 +0200 Subject: [PATCH] feat(settings): toggle for the symbol-picker chat-input button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- HellionChat/Configuration.cs | 2 ++ .../Resources/HellionStrings.Designer.cs | 4 ++++ HellionChat/Resources/HellionStrings.de.resx | 8 ++++++++ HellionChat/Resources/HellionStrings.resx | 8 ++++++++ HellionChat/Ui/ChatLogWindow.cs | 19 +++++++++++++------ HellionChat/Ui/SettingsTabs/Chat.cs | 6 ++++++ 6 files changed, 41 insertions(+), 6 deletions(-) diff --git a/HellionChat/Configuration.cs b/HellionChat/Configuration.cs index 2cc1cda..c7b0434 100755 --- a/HellionChat/Configuration.cs +++ b/HellionChat/Configuration.cs @@ -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; diff --git a/HellionChat/Resources/HellionStrings.Designer.cs b/HellionChat/Resources/HellionStrings.Designer.cs index a9d7037..559a21a 100644 --- a/HellionChat/Resources/HellionStrings.Designer.cs +++ b/HellionChat/Resources/HellionStrings.Designer.cs @@ -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)); diff --git a/HellionChat/Resources/HellionStrings.de.resx b/HellionChat/Resources/HellionStrings.de.resx index 59542f7..30d76f1 100644 --- a/HellionChat/Resources/HellionStrings.de.resx +++ b/HellionChat/Resources/HellionStrings.de.resx @@ -556,6 +556,14 @@ Emotes + + + Symbol-Picker-Button neben dem Chat-Eingang anzeigen + + + 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. + + Speicherung diff --git a/HellionChat/Resources/HellionStrings.resx b/HellionChat/Resources/HellionStrings.resx index f0a13b0..9de7345 100644 --- a/HellionChat/Resources/HellionStrings.resx +++ b/HellionChat/Resources/HellionStrings.resx @@ -556,6 +556,14 @@ Emotes + + + Show symbol-picker button next to chat input + + + 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. + + Storage diff --git a/HellionChat/Ui/ChatLogWindow.cs b/HellionChat/Ui/ChatLogWindow.cs index 6710716..0a3136b 100644 --- a/HellionChat/Ui/ChatLogWindow.cs +++ b/HellionChat/Ui/ChatLogWindow.cs @@ -799,13 +799,19 @@ 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 (ImGuiUtil.IconButton( - FontAwesomeIcon.Smile, - "symbol-picker-trigger", - "Insert symbol or FFXIV icon")) + if (Plugin.Config.SymbolPickerEnabled) { - _symbolPicker.OpenPopup(); + if (ImGuiUtil.IconButton( + FontAwesomeIcon.Smile, + "symbol-picker-trigger", + "Insert symbol or FFXIV icon")) + { + _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,7 +823,8 @@ public sealed class ChatLogWindow : Window Activate = true; ActivatePos = pos + insertedSymbol.Length; } - ImGui.SameLine(); + if (Plugin.Config.SymbolPickerEnabled) + ImGui.SameLine(); var beforeIcon = ImGui.GetCursorPos(); diff --git a/HellionChat/Ui/SettingsTabs/Chat.cs b/HellionChat/Ui/SettingsTabs/Chat.cs index d4ea21e..3115f66 100644 --- a/HellionChat/Ui/SettingsTabs/Chat.cs +++ b/HellionChat/Ui/SettingsTabs/Chat.cs @@ -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); } }