mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-28 10:26:02 +00:00
ui-widgets: keep checkbox visible during init
the SetPoint fails by having the wrong offsets, when being aligned to a hidden texture. Due to this, keep the checkmark visible till the OnShow happens and decide there wether to display the checkmark or not.
This commit is contained in:
+8
-5
@@ -222,11 +222,14 @@ do -- dropdown
|
||||
|
||||
frame.id = id
|
||||
frame.text:SetText(self.menu[id].text)
|
||||
if self.id == id then
|
||||
frame.icon:Show()
|
||||
else
|
||||
frame.icon:Hide()
|
||||
end
|
||||
|
||||
frame:SetScript("OnShow", function()
|
||||
if this.parent.id == this.id then
|
||||
this.icon:Show()
|
||||
else
|
||||
this.icon:Hide()
|
||||
end
|
||||
end)
|
||||
|
||||
frame:SetScript("OnClick", function()
|
||||
this.parent:SetSelection(this.id)
|
||||
|
||||
Reference in New Issue
Block a user