mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-25 21:40:49 +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.id = id
|
||||||
frame.text:SetText(self.menu[id].text)
|
frame.text:SetText(self.menu[id].text)
|
||||||
if self.id == id then
|
|
||||||
frame.icon:Show()
|
frame:SetScript("OnShow", function()
|
||||||
else
|
if this.parent.id == this.id then
|
||||||
frame.icon:Hide()
|
this.icon:Show()
|
||||||
end
|
else
|
||||||
|
this.icon:Hide()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
frame:SetScript("OnClick", function()
|
frame:SetScript("OnClick", function()
|
||||||
this.parent:SetSelection(this.id)
|
this.parent:SetSelection(this.id)
|
||||||
|
|||||||
Reference in New Issue
Block a user