Add window opacity slider to the Hellion theme
True per-window focus-aware transparency would require touching ChatLogWindow and SettingsWindow individually (both upstream code, both prone to cherry-pick churn). Instead expose a single opacity slider that mixes a configured alpha into the WindowBg color in PushGlobal — applies to every Hellion-rendered pane uniformly, the game shines through, and form fields / dialogs / popups stay opaque on top so input remains readable. Default 92%, range clamped to 0.5–1.0 in the UI and 0x55–0xFF in the alpha conversion so users can't accidentally make the panes disappear entirely. Slider sits inside the Appearance section right under the master Hellion-theme checkbox and is greyed out when the theme is disabled.
This commit is contained in:
@@ -77,6 +77,15 @@ internal sealed class Privacy : ISettingsTab
|
||||
ref Mutable.HellionThemeEnabled,
|
||||
HellionStrings.Theme_Enabled_Name,
|
||||
HellionStrings.Theme_Enabled_Description);
|
||||
|
||||
using (ImRaii.Disabled(!Mutable.HellionThemeEnabled))
|
||||
{
|
||||
ImGui.Spacing();
|
||||
var opacity = Mutable.HellionThemeWindowOpacity;
|
||||
if (ImGui.SliderFloat($"{HellionStrings.Theme_WindowOpacity_Label}##theme-opacity", ref opacity, 0.5f, 1.0f, "%.2f"))
|
||||
Mutable.HellionThemeWindowOpacity = Math.Clamp(opacity, 0.5f, 1.0f);
|
||||
ImGuiUtil.HelpText(HellionStrings.Theme_WindowOpacity_Help);
|
||||
}
|
||||
}
|
||||
|
||||
ImGui.Spacing();
|
||||
|
||||
Reference in New Issue
Block a user