i searched in the api for hours now.. i found only button:disabled().. but it is the wrong code i think.
My Buttons left Work, but i want to disable the Button, when "Raidbuffs anzeigen" is unchecked. Like the Right Side of Picture.
Lua Code:
local e_raidbuffs = CreateFrame("CheckButton", "EndzeitUIConfig_raidbuffs", e_panel, "OptionsCheckButtonTemplate")
e_raidbuffs:SetPoint("TOPLEFT", 316, -190)
e_raidbuffs:SetScript("OnClick", function(frame)
if EndzeitUIOptions then
if frame:GetChecked() then
PlaySound("igMainMenuOptionCheckBoxOn")
EndzeitUIOptions["raidbuffs"] = true
else
PlaySound("igMainMenuOptionCheckBoxOff")
EndzeitUIOptions["raidbuffs"] = false
end
end
end)
local e_raidbuffsText = e_raidbuffs:CreateFontString(nil, "ARTWORK", "GameFontHighlight")
e_raidbuffsText:SetPoint("LEFT", e_raidbuffs, "RIGHT", 0, 1)
e_raidbuffsText:SetText("Raidbuffs anzeigen")
-- buff: bloodlust
local e_bloodlust = CreateFrame("CheckButton", "EndzeitUIConfig_bloodlust", e_panel, "OptionsCheckButtonTemplate")
e_bloodlust:SetPoint("TOPLEFT", 326, -215)
e_bloodlust:SetScript("OnClick", function(frame)
if EndzeitUIOptions then
if frame:GetChecked() then
PlaySound("igMainMenuOptionCheckBoxOn")
EndzeitUIOptions["bloodlust"] = true
else
PlaySound("igMainMenuOptionCheckBoxOff")
EndzeitUIOptions["bloodlust"] = false
end
end
end)
local e_bloodlustText = e_bloodlust:CreateFontString(nil, "ARTWORK", "GameFontHighlight")
e_bloodlustText:SetPoint("LEFT", e_bloodlust, "RIGHT", 0, 1)
e_bloodlustText:SetText("Kampfrausch / Heldentum")
-- buff: legendary
local e_legendary = CreateFrame("CheckButton", "EndzeitUIConfig_legendary", e_panel, "OptionsCheckButtonTemplate")
e_legendary:SetPoint("TOPLEFT", 326, -240)
e_legendary:SetScript("OnClick", function(frame)
if EndzeitUIOptions then
if frame:GetChecked() then
PlaySound("igMainMenuOptionCheckBoxOn")
EndzeitUIOptions["legendary"] = true
else
PlaySound("igMainMenuOptionCheckBoxOff")
EndzeitUIOptions["legendary"] = false
end
end
end)
local e_legendaryText = e_legendary:CreateFontString(nil, "ARTWORK", "GameFontHighlight")
e_legendaryText:SetPoint("LEFT", e_legendary, "RIGHT", 0, 1)
e_legendaryText:SetText("Legendary Ring")
this 3 example buttons.