Skip to content

Commit

Permalink
Fix button alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
1337LutZ committed Aug 4, 2024
1 parent 1b14734 commit ecdac6c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions UI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,18 @@ end
---@param onClick fun()
function UI:CreateCharacterPanelButton(onClick)
local openButton = CreateFrame("Button", nil, CharacterFrame, "UIPanelButtonTemplate")
openButton:SetPoint("TOPRIGHT", CharacterFrame, "BOTTOMRIGHT", 0, 0)
if Env.IS_CLASSIC_CATA then
openButton:SetPoint("TOPRIGHT", CharacterFrame, "BOTTOMRIGHT", 0, 0)
else
openButton:SetPoint("RIGHT", CharacterFrameCloseButton, "RIGHT", 0, 0)
openButton:SetPoint("TOP", CharacterFrameTab1, "TOP", 0, 0)
end
openButton:Show()
openButton:SetText("WowSims")
openButton:SetSize(openButton:GetTextWidth() + 15, openButton:GetTextHeight() + 10)
openButton:SetScript("OnClick", openButton:SetScript("OnClick", function(self)
openButton:SetScript("OnClick", function(self)
onClick()
end))
end)
openButton:RegisterForClicks("AnyUp")
end

Expand Down

0 comments on commit ecdac6c

Please sign in to comment.