/
elseif desc.usebkd then |
if desc.bkd and desc.bkd.insets and desc.bkd.insets.left then os = desc.bkd.insets.left or 0; end |
end |
local r, g, b, a = bkd.br or 1, bkd.bg or 1, bkd.bb or 1, bkd.ba or 1; |
local showweapons = "false"; |
if desc.showweapons then showweapons = "true"; end |
if not desc.xoffset then desc.xoffset = "0"; end |
_bn, _, _tex, _apps, _dispelt, _dur, _et = UnitAura("player",child:GetID(), "]] .. filter .. [["); |
if _bn then |
child.btn.tex:SetTexture(_tex); |
if _dispelt and DebuffTypeColor[_dispelt] then |
if ]] .. usebs .. [[ then |
child.btn._texBorder:SetVertexColor(VFL.explodeColor(DebuffTypeColor[_dispelt])); |
elseif ]] .. usebkd .. [[ then |
child.btn:SetBackdropBorderColor(VFL.explodeRGBA(DebuffTypeColor[_dispelt])); |
end |
else |
if ]] .. usebs .. [[ then |
child.btn._texBorder:SetVertexColor(1, 1, 1, 1); |
elseif ]] .. usebkd .. [[ then |
child.btn:SetBackdropBorderColor(]] .. r .. [[, ]] .. g .. [[, ]] .. b .. [[, ]] .. a .. [[); |
end |
end |
child.btn.cd:SetCooldown(_et - _dur, _dur); |
if _apps > 1 then child.btn.sttxt:SetText(_apps); else child.btn.sttxt:SetText("");end |
child.btn:Show(); |
if desc.bkd and desc.bkd.insets and desc.bkd.insets.left then os = desc.bkd.insets.left or 0; end |
end |
local r, g, b, a = bkd.br or 1, bkd.bg or 1, bkd.bb or 1, bkd.ba or 1; |
local loadCode = "LoadBuffFromUnit"; |
-- Event hinting. |
local mux, mask = state:GetContainingWindowState():GetSlotValue("Multiplexer"), 0; |
btn.meta = _meta; |
btn.tex:SetTexture(_tex); |
if _dispelt and DebuffTypeColor[_dispelt] then |
btn._texBorder:SetVertexColor(VFL.explodeColor(DebuffTypeColor[_dispelt])); |
if ]] .. usebs .. [[ then |
btn._texBorder:SetVertexColor(VFL.explodeColor(DebuffTypeColor[_dispelt])); |
elseif ]] .. usebkd .. [[ then |
btn:SetBackdropBorderColor(VFL.explodeRGBA(DebuffTypeColor[_dispelt])); |
end |
else |
btn._texBorder:SetVertexColor(1, 1, 1, 1); |
if ]] .. usebs .. [[ then |
btn._texBorder:SetVertexColor(1, 1, 1, 1); |
elseif ]] .. usebkd .. [[ then |
btn:SetBackdropBorderColor(]] .. r .. [[, ]] .. g .. [[, ]] .. b .. [[, ]] .. a .. [[); |
end |
end |
-- Cooldown |
if _dur and _dur > 0 and btn.cd then |
if ]] .. usebs .. [[ then |
btn._texBorder:SetVertexColor(1, 1, 1, 1); |
elseif ]] .. usebkd .. [[ then |
btn:SetBackdropBorderColor(1, 1, 1, 1); |
btn:SetBackdropBorderColor(]] .. r .. [[, ]] .. g .. [[, ]] .. b .. [[, ]] .. a .. [[); |
end |
end |
OpenPage = function(parent, wizard, desc) |
local page = RDXUI.GenerateStdWizardPage(parent, title_text[1]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[1]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[1], "LEFT", "TOP"); |
lbl:SetWidth(250); lbl:SetHeight(120); |
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20); |
chk_hideLW:SetPoint("TOPLEFT", lbl, "BOTTOMLEFT", 0, -20); |
chk_hideLW:SetText("Not show this guide at startup."); |
if RDXG and RDXG.hideLW then chk_hideLW:SetChecked(true); else chk_hideLW:SetChecked(); end |
local lb2 = VFLUI.MakeLabel(nil, page, "1/13", "CENTER", "CENTER"); |
lb2:SetWidth(250); lb2:SetHeight(10); |
lb2:SetPoint("BOTTOM", page, "BOTTOM", 0, 5); |
function page:GetDescriptor() |
if RDXG then RDXG.hideLW = chk_hideLW:GetChecked(); end |
OpenPage = function(parent, wizard, desc) |
local page = RDXUI.GenerateStdWizardPage(parent, title_text[2]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[2]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[2], "LEFT", "TOP"); |
lbl:SetWidth(250); lbl:SetHeight(160); |
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20); |
local lb2 = VFLUI.MakeLabel(nil, page, "2/13", "CENTER", "CENTER"); |
lb2:SetWidth(250); lb2:SetHeight(10); |
lb2:SetPoint("BOTTOM", page, "BOTTOM", 0, 5); |
function page:GetDescriptor() |
return {}; |
end |
OpenPage = function(parent, wizard, desc) |
local page = RDXUI.GenerateStdWizardPage(parent, title_text[2]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[3]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[3], "LEFT", "TOP"); |
lbl:SetWidth(250); lbl:SetHeight(160); |
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20); |
local lb2 = VFLUI.MakeLabel(nil, page, "3/13", "CENTER", "CENTER"); |
lb2:SetWidth(250); lb2:SetHeight(10); |
lb2:SetPoint("BOTTOM", page, "BOTTOM", 0, 5); |
function page:GetDescriptor() |
return {}; |
end |
OpenPage = function(parent, wizard, desc) |
local page = RDXUI.GenerateStdWizardPage(parent, title_text[3]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[4]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[4], "LEFT", "TOP"); |
lbl:SetWidth(250); lbl:SetHeight(160); |
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20); |
local lb2 = VFLUI.MakeLabel(nil, page, "4/13", "CENTER", "CENTER"); |
lb2:SetWidth(250); lb2:SetHeight(10); |
lb2:SetPoint("BOTTOM", page, "BOTTOM", 0, 5); |
function page:GetDescriptor() |
return {}; |
end |
OpenPage = function(parent, wizard, desc) |
local page = RDXUI.GenerateStdWizardPage(parent, title_text[4]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[5]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[5], "LEFT", "TOP"); |
lbl:SetWidth(250); lbl:SetHeight(190); |
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20); |
RDXG.learnNum = 5; |
local lb2 = VFLUI.MakeLabel(nil, page, "5/13", "CENTER", "CENTER"); |
lb2:SetWidth(250); lb2:SetHeight(10); |
lb2:SetPoint("BOTTOM", page, "BOTTOM", 0, 5); |
function page:GetDescriptor() |
return {}; |
end |
RDXG.learnNum = 5; |
wizard:OnNext(function(wiz) wiz:SetPage(6); end); |
return page; |
OpenPage = function(parent, wizard, desc) |
local page = RDXUI.GenerateStdWizardPage(parent, title_text[4]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[6]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[6], "LEFT", "TOP"); |
lbl:SetWidth(250); lbl:SetHeight(160); |
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20); |
local lb2 = VFLUI.MakeLabel(nil, page, "6/13", "CENTER", "CENTER"); |
lb2:SetWidth(250); lb2:SetHeight(10); |
lb2:SetPoint("BOTTOM", page, "BOTTOM", 0, 5); |
RDXG.learnNum = 6; |
function page:GetDescriptor() |
OpenPage = function(parent, wizard, desc) |
local page = RDXUI.GenerateStdWizardPage(parent, title_text[4]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[7]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[7], "LEFT", "TOP"); |
lbl:SetWidth(250); lbl:SetHeight(160); |
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20); |
local lb2 = VFLUI.MakeLabel(nil, page, "7/13", "CENTER", "CENTER"); |
lb2:SetWidth(250); lb2:SetHeight(10); |
lb2:SetPoint("BOTTOM", page, "BOTTOM", 0, 5); |
RDXG.learnNum = 7; |
function page:GetDescriptor() |
OpenPage = function(parent, wizard, desc) |
local page = RDXUI.GenerateStdWizardPage(parent, title_text[4]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[8]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[8], "LEFT", "TOP"); |
lbl:SetWidth(250); lbl:SetHeight(160); |
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20); |
local lb2 = VFLUI.MakeLabel(nil, page, "8/13", "CENTER", "CENTER"); |
lb2:SetWidth(250); lb2:SetHeight(10); |
lb2:SetPoint("BOTTOM", page, "BOTTOM", 0, 5); |
RDXG.learnNum = 8; |
function page:GetDescriptor() |
OpenPage = function(parent, wizard, desc) |
local page = RDXUI.GenerateStdWizardPage(parent, title_text[5]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[9]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[9], "LEFT", "TOP"); |
lbl:SetWidth(250); lbl:SetHeight(160); |
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20); |
local lb2 = VFLUI.MakeLabel(nil, page, "9/13", "CENTER", "CENTER"); |
lb2:SetWidth(250); lb2:SetHeight(10); |
lb2:SetPoint("BOTTOM", page, "BOTTOM", 0, 5); |
RDXG.learnNum = 9; |
function page:GetDescriptor() |
OpenPage = function(parent, wizard, desc) |
local page = RDXUI.GenerateStdWizardPage(parent, title_text[6]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[10]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[10], "LEFT", "TOP"); |
lbl:SetWidth(250); lbl:SetHeight(160); |
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20); |
local lb2 = VFLUI.MakeLabel(nil, page, "10/13", "CENTER", "CENTER"); |
lb2:SetWidth(250); lb2:SetHeight(10); |
lb2:SetPoint("BOTTOM", page, "BOTTOM", 0, 5); |
RDXG.learnNum = 10; |
function page:GetDescriptor() |
OpenPage = function(parent, wizard, desc) |
local page = RDXUI.GenerateStdWizardPage(parent, title_text[7]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[11]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[11], "LEFT", "TOP"); |
lbl:SetWidth(250); lbl:SetHeight(160); |
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20); |
local lb2 = VFLUI.MakeLabel(nil, page, "11/13", "CENTER", "CENTER"); |
lb2:SetWidth(250); lb2:SetHeight(10); |
lb2:SetPoint("BOTTOM", page, "BOTTOM", 0, 5); |
RDXG.learnNum = 11; |
function page:GetDescriptor() |
OpenPage = function(parent, wizard, desc) |
local page = RDXUI.GenerateStdWizardPage(parent, title_text[7]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[12]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[12], "LEFT", "TOP"); |
lbl:SetWidth(250); lbl:SetHeight(160); |
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20); |
local lb2 = VFLUI.MakeLabel(nil, page, "12/13", "CENTER", "CENTER"); |
lb2:SetWidth(250); lb2:SetHeight(10); |
lb2:SetPoint("BOTTOM", page, "BOTTOM", 0, 5); |
RDXG.learnNum = 12; |
function page:GetDescriptor() |
OpenPage = function(parent, wizard, desc) |
local page = RDXUI.GenerateStdWizardPage(parent, title_text[8]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[13]); |
local lbl = VFLUI.MakeLabel(nil, page, content_text[13], "LEFT", "TOP"); |
lbl:SetWidth(250); lbl:SetHeight(160); |
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20); |
RDXG.learnNum = 13; |
local lb2 = VFLUI.MakeLabel(nil, page, "13/13", "CENTER", "CENTER"); |
lb2:SetWidth(250); lb2:SetHeight(10); |
lb2:SetPoint("BOTTOM", page, "BOTTOM", 0, 5); |
RDXG.learnNum = 1; |
function page:GetDescriptor() |
return {}; |
end |
-- from this function; sizing is automatic. |
-- |
-- Intended to be single-line. |
function VFLUI.MakeLabel(src, parent, text) |
function VFLUI.MakeLabel(src, parent, text, jh, jv) |
local fs = VFLUI.CreateFontString(parent); |
VFLUI.SetFont(fs, Fonts.Default, 10); |
fs:SetHeight(10); |
fs:SetJustifyH("LEFT"); fs:SetJustifyV("TOP"); |
fs:SetJustifyH(jh or "LEFT"); fs:SetJustifyV(jv or "CENTER"); |
fs:SetText(text); fs:SetWidth(fs:GetStringWidth() + 10); |
fs:Show(); |
parent.Destroy = VFL.hook(function() VFLUI.ReleaseRegion(fs); fs = nil; end, parent.Destroy); |