ui-widgets: avoid ui taints of button skins

slightly changes the appearance of checked buttons from an
outline of active buttons to a glow effect using class colors.
This commit is contained in:
shagu
2020-12-28 20:51:25 +01:00
parent 48370871cd
commit 7a7ca5da82
+2 -10
View File
@@ -625,17 +625,9 @@ function pfUI.api.SkinButton(button, cr, cg, cb, icon, disableHighlight)
b:SetHighlightTexture("")
b:SetPushedTexture("")
b:SetDisabledTexture("")
if b.SetCheckedTexture then
b:SetCheckedTexture(nil)
function b.SetChecked(self, checked)
if checked == 1 then
self.locked = true
self:SetBackdropBorderColor(1,1,1)
else
self.locked = false
self:SetBackdropBorderColor(GetStringColor(pfUI_config.appearance.border.color))
end
end
b:GetCheckedTexture():SetTexture(cr, cg, cb, .25)
end
if not disableHighlight then