This commit is contained in:
Tercio Jose
2022-09-01 18:51:25 -03:00
parent 22b83e722c
commit 4fe02b4ddc
5 changed files with 15 additions and 8 deletions
+2 -1
View File
@@ -1098,12 +1098,13 @@ function DF:NewButton (parent, container, name, member, w, h, func, param1, para
ButtonObject.text_overlay = _G [name .. "_Text"]
ButtonObject.disabled_overlay = _G [name .. "_TextureDisabled"]
texture = texture or ""
ButtonObject.button:SetNormalTexture (texture)
ButtonObject.button:SetPushedTexture (texture)
ButtonObject.button:SetDisabledTexture (texture)
ButtonObject.button:SetHighlightTexture (texture, "ADD")
ButtonObject.button.text:SetText (text)
ButtonObject.button.text:SetText (text or "")
ButtonObject.button.text:SetPoint ("center", ButtonObject.button, "center")
local text_width = ButtonObject.button.text:GetStringWidth()