enforce limits on alpha slider (#2412)
Some checks failed
Tag Build / Tag Build (push) Successful in 2s
Build Dalamud / Build on Windows (push) Has been cancelled
Build Dalamud / Check API Compatibility (push) Has been cancelled
Build Dalamud / Deploy dalamud-distrib staging (push) Has been cancelled

This commit is contained in:
Caraxi 2025-09-22 12:54:48 +09:30 committed by GitHub
parent c38365bc99
commit 0b3a5a713e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -523,7 +523,7 @@ public abstract class Window
if (ImGui.SliderFloat(Loc.Localize("WindowSystemContextActionAlpha", "Opacity"), ref alpha, 20f,
100f))
{
this.internalAlpha = alpha / 100f;
this.internalAlpha = Math.Clamp(alpha / 100f, 0.2f, 1f);
this.presetDirty = true;
}