Skip to content

Commit

Permalink
Replace text with texture for pixel "-" button.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wetxius committed Oct 25, 2020
1 parent 7eaa102 commit ea2061b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions ShestakUI/Core/Functions.lua
Expand Up @@ -466,6 +466,12 @@ function T.SkinCloseButton(f, point, text, pixel)
f.text:SetPoint("CENTER")
f.text:SetTexture(C.media.blank)
end
if text == "-" and pixel then
f.text = f:CreateTexture(nil, "OVERLAY")
f.text:SetSize(5, 1)
f.text:SetPoint("CENTER")
f.text:SetTexture(C.media.blank)
end
if not f.text then
if pixel then
f.text = f:FontString(nil, C.media.pixel_font, 8)
Expand Down
6 changes: 3 additions & 3 deletions ShestakUI/Modules/Loot/Loot.lua
Expand Up @@ -196,7 +196,7 @@ Butsu:SetFrameLevel(10)

local close = CreateFrame("Button", "LootCloseButton", Butsu, "UIPanelCloseButton")
T.SkinCloseButton(close, nil, nil, true)
close:SetSize(14, 14)
close:SetSize(15, 15)
close:SetScript("OnClick", function() CloseLoot() end)

----------------------------------------------------------------------------------------
Expand Down Expand Up @@ -266,9 +266,9 @@ local function LDD_Initialize()
end

T.SkinCloseButton(lb, LootCloseButton, "-", true)
lb:SetSize(14, 14)
lb:SetSize(15, 15)
lb:ClearAllPoints()
lb:SetPoint("BOTTOMRIGHT", Butsu, "TOPRIGHT", -21, -18)
lb:SetPoint("BOTTOMRIGHT", Butsu, "TOPRIGHT", -22, -19)
lb:SetFrameStrata("DIALOG")
lb:RegisterForClicks("RightButtonUp", "LeftButtonUp")
lb:SetScript("OnClick", function(_, button)
Expand Down

0 comments on commit ea2061b

Please sign in to comment.