WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   PTR General Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=172)
-   -   BlizzardOptions - CreateFrame - patch 10.0.0 PTR (https://www.wowinterface.com/forums/showthread.php?t=59209)

Platine 09-10-22 08:15 AM

BlizzardOptions - CreateFrame - patch 10.0.0 PTR
 
What changed with the creation of the CheckButton in patch 10.0 ?
OptionsCheckButtonTemplate no longer exists? What's in return?

Quote:

function QTR_BlizzardOptions()
local QTRCheckButton0 = CreateFrame("CheckButton", "QTRCheckButton0", QTROptions, "OptionsCheckButtonTemplate");
QTRCheckButton0:SetPoint("TOPLEFT", QTROptionsHeader, "BOTTOMLEFT", 0, -20);
QTRCheckButton0:SetScript("OnClick", function(self) if (QTR_PS["active"]=="1") then QTR_PS["active"]="0" else QTR_PS["active"]="1" end; end);
QTRCheckButton0Text:SetFont(QTR_Font2, 13);
QTRCheckButton0Text:SetText(QTR_Interface.active);
end

Fizzlemizz 09-10-22 08:26 AM

It's listed in DepricatedTemplates.xml so gone. You would have to check the new options code to find the replacement.

Sunnova 09-10-22 08:41 AM

I used UIPanelButtonTemplate in place of OptionsButtonTemplate, it's working fine for me so far in my testing, if you find something else that should be used, please let me know. Thanks.

Fizzlemizz 09-10-22 09:05 AM

Probably something using or based on SettingsCheckBoxControlTemplate.

Just a guess after a quick look through and may change as the beta progresses.

Platine 09-10-22 10:35 AM

UIPanelButtonTemplate is not a button of the type CheckBox.
SettingsCheckBoxControlTemplate produces the correct CheckBox button.



Quote:

local QTRCheckButton0 = CreateFrame("CheckButton", "QTRCheckButton0", QTROptions, "SettingsCheckBoxControlTemplate");
QTRCheckButton0.CheckBox:SetScript("OnClick", function(self) if (QTR_PS["active"]=="1") then QTR_PS["active"]="0" else QTR_PS["active"]="1" end; end);
QTRCheckButton0.CheckBox:SetPoint("TOPLEFT", QTROptionsHeader, "BOTTOMLEFT", 0, -30); -- pozycja przycisku CheckBox
QTRCheckButton0:SetPoint("TOPLEFT", QTROptionsHeader, "BOTTOMLEFT", 40, -30); -- pozycja opisu przycisku CheckBox
QTRCheckButton0.Text:SetFont(QTR_Font2, 13);
QTRCheckButton0.Text:SetText(QTR_Interface.active);

Sunnova 09-10-22 01:37 PM

Quote:

Originally Posted by Platine (Post 340970)
UIPanelButtonTemplate is not a button of the type CheckBox.
SettingsCheckBoxControlTemplate produces the correct CheckBox button.


Thank you!


All times are GMT -6. The time now is 04:50 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI