api: update SkinArrowButton

add size argument
This commit is contained in:
Artur Morozov
2019-03-31 14:59:21 +02:00
committed by shagu
parent d4154e138e
commit f478066a00
+6 -1
View File
@@ -308,7 +308,7 @@ function pfUI.api.SkinCloseButton(button, parentFrame, offsetX, offsetY)
button.texture:SetVertexColor(1,.25,.25,1)
end
function pfUI.api.SkinArrowButton(button, dir)
function pfUI.api.SkinArrowButton(button, dir, size)
SkinButton(button)
button:SetHitRectInsets(-3,-3,-3,-3)
@@ -318,6 +318,11 @@ function pfUI.api.SkinArrowButton(button, dir)
button:SetHighlightTexture(nil)
button:SetDisabledTexture(nil)
if size then
button:SetWidth(size)
button:SetHeight(size)
end
if not button.icon then
button.icon = button:CreateTexture(nil, "ARTWORK")
button.icon:SetAlpha(.8)