Originally Posted by circonian
In a LibAddonMenu checkbox is there a function to get a true/false value to see if it is checked or not without grabbing the checkbox:GetText() and comparing it to controls checktedText to see if they match? Its a value I didn't want to save. I just wanted to read it when the user presses a button while the panel is still open and then I don't need it anymore.
|
You can provide getFunc/setFunc handlers that will tie checkbox status to a variable.
Lua Code:
local g_checked = false
local checkboxData = {
...
getFunc = function() return g_checked end,
setFunc = function(value) g_checked = value end,
}
Originally Posted by circonian
While I'm at it, since LibAddonMenu controls aren't created until the panel is open is there a way to know when the controls are created so you can change the CheckedText/UncheckedText ?
|
Lua Code:
-- hope it's correct syntax
CALLBACK_MANAGER:RegisterCallback("LAM-PanelControlsCreated", handler)