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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user