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.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user