From 439c919d7752bc631670096ef2e5e21d34dda2da Mon Sep 17 00:00:00 2001 From: Jon Kazama Date: Wed, 19 Aug 2026 17:13:06 +0200 Subject: [PATCH] feat(chat): a button for screenshot mode, where it can actually be found It has only ever lived in the right-click menu on a player name. For a privacy feature that is the same as not existing -- reported as missing by a tester who has been running the plugin for months and never found it. Now a camera in the input row, next to hide-window, and lit in the accent colour while active. A mode whose state you cannot see is worse than no mode: the whole point is knowing whether the names on your screen are real before you press the screenshot key. The button reserve goes from 130 to 156 to fit it. No new string -- the context menu's label is already translated into all 25 languages and says exactly what the button does. --- HellionChat/Ui/Components/InputBar.cs | 23 +++++++++++++++++++++++ HellionChat/Ui/StyleEngine/Metrics.cs | 6 +++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/HellionChat/Ui/Components/InputBar.cs b/HellionChat/Ui/Components/InputBar.cs index 60bac08..545c741 100644 --- a/HellionChat/Ui/Components/InputBar.cs +++ b/HellionChat/Ui/Components/InputBar.cs @@ -658,6 +658,29 @@ internal sealed class InputBar if (ImGui.IsItemHovered()) tooltip = HellionStrings.InputBar_Settings_Tooltip; + // Screenshot mode. It lived only in the right-click menu on a player + // name, which for a privacy feature is the same as not existing -- + // reported as missing by a tester who had been using the plugin for + // months. Lit when active, because a mode you cannot see the state of + // is worse than no mode. + ImGui.SameLine(); + var shooting = Plugin.Config.ScreenshotMode; + using ( + ImRaii.PushColor( + ImGuiCol.Text, + ColourUtil.RgbaToVector4( + _resolver.Resolve(Token.AccentEmber, _themes.Active.Colors) + ), + shooting + ) + ) + { + if (ImGui.Button(FontAwesomeIcon.Camera.ToIconString())) + Plugin.Config.ScreenshotMode = !Plugin.Config.ScreenshotMode; + } + if (ImGui.IsItemHovered()) + tooltip = Language.Context_ScreenshotMode; + // Hides the window (1.5.6 UserHide). One-way — Enter brings it back. // Main window only; last in the row there. if (Plugin.Config.ShowHideButton && _onHideWindow is not null) diff --git a/HellionChat/Ui/StyleEngine/Metrics.cs b/HellionChat/Ui/StyleEngine/Metrics.cs index 37426d3..2535881 100644 --- a/HellionChat/Ui/StyleEngine/Metrics.cs +++ b/HellionChat/Ui/StyleEngine/Metrics.cs @@ -26,7 +26,11 @@ internal static class Metrics // --- Input bar --- internal const float InputBarHeightRaw = 32f; - internal const float InputQuickButtonsReserveRaw = 130f; + + // Raised from 130 in v1.13.0 for the screenshot-mode button. Five buttons in + // the main window (symbols, theme, screenshot, settings, hide) and five in a + // pop-out, where pop-in takes the place of hide. + internal const float InputQuickButtonsReserveRaw = 156f; // --- Honorific header --- internal const float HonorificHeightRaw = 30f;