fix missing ,
mNo edit summary |
(fix missing ,) |
||
| Line 18: | Line 18: | ||
myCheckButton.tooltip = "This is where you place MouseOver Text."; | myCheckButton.tooltip = "This is where you place MouseOver Text."; | ||
Set up what happens when you click the checkbox. You can add other scripts similarly to how I have this one, you just need to change the "OnClick" to whatever else. http://www.wowwiki.com/Category:Widget_event_handlers Note that you cannot pass arguments to the "OnClick" script's function, but you can do other things as in a normal function | Set up what happens when you click the checkbox. You can add other scripts similarly to how I have this one, you just need to change the "OnClick" to whatever else. [https://wowwiki.fandom.com/Category:Widget_event_handlers http://www.wowwiki.com/Category:Widget_event_handlers] Note that you cannot pass arguments to the "OnClick" script's function, but you can do other things as in a normal function | ||
myCheckButton:SetScript("OnClick", | myCheckButton:SetScript("OnClick", | ||
function() | function() | ||
| Line 51: | Line 51: | ||
end | end | ||
myCheckButton = bw_addon.createCheckbutton(UIParent, 400, -600 "A Checkbox"); | myCheckButton = bw_addon.createCheckbutton(UIParent, 400, -600, "A Checkbox"); | ||
myCheckButton.tooltip = "If this is checked, nothing will happen, because this is a demo checkbox."; | myCheckButton.tooltip = "If this is checked, nothing will happen, because this is a demo checkbox."; | ||
myCheckButton:SetScript("OnClick", | myCheckButton:SetScript("OnClick", | ||