Code:
local frame = CreateFrame("CheckButton", "alUIConfigButton1", al)
frame:SetWidth(26)
frame:SetHeight(26)
frame:SetPoint("TOPLEFT", 16, -52)
frame:SetScript("OnShow", function(frame)
if alUI_DB.example then
frame:SetChecked(true)
else
frame:SetChecked(false)
end
end)
frame:SetScript("OnClick", function(frame)
local tick = frame:GetChecked()
if tick then
PlaySound("igMainMenuOptionCheckBoxOn")
alUI_DB.example = true
else
PlaySound("igMainMenuOptionCheckBoxOff")
alUI_DB.example = false
end
end)
taken straight out of BadBoy, but looking @ his code. his booleans are pre-defined so it kinda means i need to change things. which dont know how