View Single Post
06-01-10, 01:14 PM   #11
alimjocox
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Oct 2009
Posts: 96
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
  Reply With Quote