I logged into wow to try out your code, Aftermath, then
Fatality popped up and I figured I may as well see what makes it's check buttons click. c.c
Sooo, credit to
oomp for his buttons. <_<
...and to my wife for the motivation for the screenshot. <_<
lua Code:
function TRUESYS.Checkbox(self, selfid, px, py, description)
local checkbox = CreateFrame("CheckButton", "TrueAuiEnableButton_" .. selfid, self, "OptionsSmallCheckButtonTemplate")
checkbox:SetScript("OnClick", Checkbox_OnClick)
checkbox:SetPoint("TOPLEFT", self, px, py)
checkbox:SetWidth(28)
checkbox:SetHeight(28)
checkbox:SetHitRectInsets(0, -60, 0, 0)
checkbox:GetNormalTexture():SetAlpha(0.6)
local checkboxtexture = checkbox:CreateTexture(nil, "ARTWORK")
checkboxtexture:SetWidth(22)
checkboxtexture:SetHeight(22)
checkboxtexture:SetAlpha(0.9)
checkboxtexture:SetPoint("LEFT", 2, 1)
checkboxtexture:SetTexture("Interface\\RAIDFRAME\\ReadyCheck-Ready")
checkbox:SetCheckedTexture(checkboxtexture)
local checkboxtext = self:CreateFontString(nil, "ARTWORK", "GameFontNormal")
checkboxtext:SetPoint("LEFT", checkbox, "RIGHT", 5, 1)
checkboxtext:SetFontObject("GameFontNormal")
checkboxtext:SetText(description)
end
function TRUESYS.CreateOptions(self, TextTitle, DescriptionsText)
local title = self:CreateFontString(nil, "OVERLAY")
title:SetFontObject('GameFontNormalLarge')
title:SetPoint('TOPLEFT', 16, -16)
title:SetText(TextTitle)
local title2 = self:CreateFontString(nil, "OVERLAY")
title2:SetFontObject('GameFontHighlightSmall')
title2:SetPoint('TOPLEFT', 18, -35)
title2:SetText(DescriptionsText)
end
TRUESYS.panel = CreateFrame("Frame", "TrueAuiOptions", UIParent)
TRUESYS.panel.name = "|cff89F559True|r|c007ffcffAui|r"
TRUESYS.CreateOptions(TRUESYS.panel, "|cff89F559(True)|r |c007ffcffAdaptive User Interface|r", "http://www.wowrdx.com")
TRUESYS.Checkbox(TRUESYS.panel, 1, 18, -60, "Enable ability priority system")
TRUESYS.Checkbox(TrueAuiEnableButton_1, 2, 1, -25, "Enable PVP trinket tracking")
TRUESYS.Checkbox(TrueAuiEnableButton_2, 3, 1, -25, "Enable loving your incredibly fussy wife forever")
InterfaceOptions_AddCategory(TRUESYS.panel)
I don't know how to make it actually work yet, but, just thought I'd share the good looking button code. c.c