WoWInterface SVN OpenRDX

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 675 to Rev 676
    Reverse comparison

Rev 675 → Rev 676

trunk/VFL/Errors/Error.lua
91,9 → 91,9
-- @return number
function VFL.Error:Count() return self.count; end
 
--- HasErrors
--- HasError
-- @return boolean
function VFL.Error:HasErrors() return (self.count > 0); end
function VFL.Error:HasError() return (self.count > 0); end
 
--- Clean this error Message
function VFL.Error:Clear()
145,7 → 145,7
--- HasError in a error object declare as param
-- @param errs The error object VFL.error
function VFL.HasError(errs)
if errs then return errs:HasErrors(); else return nil; end
if errs then return errs:HasError(); else return nil; end
end
 
--- A global error object to save memory.
trunk/VFL/UI/Pickers/BackdropPicker.lua
9,6 → 9,13
_backdrop = "none";
};
 
VFLUI.nilBackdrop = {
_border = "none";
bgFile = nil;
_backdrop = "none";
edgeFile = nil;
};
 
local curBackdrop, clipboard = {}, nil;
local onOK, onCancel, bdp_owner = VFL.Noop, VFL.Noop, nil;
local UpdateBackdropPicker;
trunk/VFL/UI/Core.lua
695,11 → 695,11
frame._VFL = true;
frame._sourcePool = pool;
frame.Destroy = GenericDestroy;
if not frame._hookedHideShow then
frame._hookedHideShow = true;
hooksecurefunc(frame, "Hide", TimerHide);
hooksecurefunc(frame, "Show", TimerShow);
end
--if not frame._hookedHideShow then
-- frame._hookedHideShow = true;
-- hooksecurefunc(frame, "Hide", TimerHide);
-- hooksecurefunc(frame, "Show", TimerShow);
--end
--frame.AnimationGroup = frame:CreateAnimationGroup();
return frame;
end
trunk/VFL/UI/FrameClasses/WindowFraming.lua
81,9 → 81,9
-----------------------------------------------------
-- DEFAULT FRAMING
-----------------------------------------------------
function VFLUI.Framing.Default(self, titleHeight)
function VFLUI.Framing.Default(self, titleHeight, bkd)
-------------------------- WINDOW DECOR
self:SetBackdrop(VFLUI.BlizzardDialogBackdrop);
self:SetBackdrop(bkd or VFLUI.BlackDialogBackdrop);
 
local titleBar = self:GetTitleBar();
titleBar:SetPoint("TOPLEFT", self, "TOPLEFT", 5, -5);
169,6 → 169,7
local ca = self:GetClientArea();
ca:SetWidth(tw - 10); ca:SetHeight(self:GetHeight() - titleHeight - 7);
end
self:SetBackdrop(bkd or VFLUI.BlackDialogBackdrop);
end
 
function self:_FrameDestroy()
189,8 → 190,8
end
 
--- COMPAT: A lot of code uses this.
function VFLUI.Window.SetDefaultFraming(self, titleHeight)
self:SetFraming(VFLUI.Framing.Default, titleHeight);
function VFLUI.Window.SetDefaultFraming(self, titleHeight, bkd)
self:SetFraming(VFLUI.Framing.Default, titleHeight, bkd);
end
 
-----------------------------------------------------
304,6 → 305,7
local ca = self:GetClientArea();
ca:SetWidth(tw - 2); ca:SetHeight(self:GetHeight() - 15);
end
--self:SetBackdrop(plainBackdrop);
end
 
function self:_FrameDestroy()
406,6 → 408,7
local ca = self:GetClientArea();
ca:SetWidth(tw); ca:SetHeight(self:GetHeight() - 22);
end
--decor:SetBackdrop(VFLUI.DefaultDialogBackdrop);
end
 
function self:_FrameDestroy()
461,7 → 464,7
local clientArea = self:GetClientArea();
clientArea:ClearAllPoints();
clientArea:SetPoint("TOPLEFT", decor, "TOPLEFT", 10, -10);
clientArea:SetPoint("BOTTOMRIGHT", decor, "BOTTOMRIGHT", -10, 10);
clientArea:SetPoint("BOTTOMRIGHT", decor, "BOTTOMRIGHT", -10, 10);
function self:Accomodate(dx, dy)
self:SetWidth(dx+60); self:SetHeight(dy + 60);
end
485,6 → 488,7
local ca = self:GetClientArea();
ca:SetWidth(tw-30); ca:SetHeight(self:GetHeight() - 30);
end
--decor:SetBackdrop(VFLUI.DefaultDialogBackdrop);
end
 
function self:_FrameDestroy()
trunk/VFL/UI/FrameClasses/Button.lua
378,8 → 378,14
if not btype then btype = "Button"; end
local obj = VFLUI.AcquireFrame(btype, id);
if not obj then return nil; end
obj:SetParent(parent);
 
if parent then
obj:SetParent(parent);
--obj:SetAllPoints(parent);
obj:SetFrameStrata(parent:GetFrameStrata());
obj:SetFrameLevel(parent:GetFrameLevel() + 1);
end
 
obj:Show();
local framesup = VFLUI.AcquireFrame("Frame");
framesup:SetParent(obj);
528,3 → 534,43
 
return obj;
end
 
VFLUI.BckButton = {};
function VFLUI.BckButton:new(parent, btype, id)
if not btype then btype = "Button"; end
local obj = VFLUI.AcquireFrame(btype, id);
if not obj then return nil; end
if parent then
obj:SetParent(parent);
obj:SetFrameStrata(parent:GetFrameStrata());
obj:SetFrameLevel(parent:GetFrameLevel() + 1);
end
obj:Show();
 
--local frbkd = VFLUI.AcquireFrame("Frame");
--frbkd:SetParent(obj);
--frbkd:SetAllPoints(obj);
--frbkd:Show();
--obj.frbkd = frbkd;
 
-- set button skin function
obj.SetButtonBkd = function(self, bkd)
VFLUI.SetBackdrop(self, bkd);
end;
 
obj.bsHide = function(self)
--self.frbkd:Hide();
end
 
obj.bsShow = function(self)
--self.frbkd:Show();
end
 
obj.Destroy = VFL.hook(function(s)
s.SetButtonBck = nil; s.bsHide = nil; s.bsShow = nil;
--s.frbkd:Destroy(); s.frbkd = nil;
end, obj.Destroy);
 
return obj;
end
 
trunk/VFL/UI/MessageBox.lua
14,7 → 14,6
-- Create window
local dlg = VFLUI.Window:new(parent or VFLFULLSCREEN_DIALOG);
VFLUI.Window.SetDefaultFraming(dlg, 22);
dlg:SetBackdrop(VFLUI.BlackDialogBackdrop);
dlg:SetTitleColor(0,0,.6);
dlg:SetPoint("CENTER", VFLParent, "CENTER", 0, 50);
dlg:SetText(title);
72,7 → 71,7
btn2:SetScript("OnClick", OK);
end
 
dlg:SetHeight(40 + th + eh + bh); dlg:Show();
dlg:SetHeight(40 + th + eh + bh); dlg:SetBackdrop(VFLUI.BlackDialogBackdrop); dlg:Show();
 
dlg.Destroy = VFL.hook(function(s)
GetEditText = nil;
trunk/RDX/ObjectMgr/ObjectBrowser.lua
548,11 → 548,11
if dlg then return; end
 
dlg = VFLUI.Window:new(parent);
dlg:SetHeight(400); dlg:SetWidth(500);
VFLUI.Window.SetDefaultFraming(dlg, 24);
dlg:SetTitleColor(0,.6,0);
dlg:SetText("Repository Objects Browser");
dlg:SetPoint("CENTER", VFLParent, "CENTER");
dlg:SetHeight(400); dlg:SetWidth(500);
 
if RDXPM.Ismanaged("ObjectBrowser") then RDXPM.RestoreLayout(dlg, "ObjectBrowser"); end
VFLUI.Window.StdMove(dlg, dlg:GetTitleBar());
618,12 → 618,12
 
-- Escapement
local esch = function()
dlg:Hide(.2, true);
VFLT.ZMSchedule(.25, function()
RDXPM.StoreLayout(dlg, "ObjectBrowser");
--dlg:Hide(.2, true);
--VFLT.ZMSchedule(.25, function()
-- RDXPM.StoreLayout(dlg, "ObjectBrowser");
dlg:Destroy(); dlg = nil;
if selCallback then selCallback(nil); end
end);
--end);
end;
VFL.AddEscapeHandler(esch);
 
trunk/RDX/ObjectMgr/Install/OOBE.lua
308,7 → 308,7
end
-- Show the post install options window.
if(VFL.tsize(toggles) > 0) then
ShowInstallerDialog(VFLI.i18n("RDX6 Installer"), VFLI.i18n("The following post-installation options are available:"), InstallPhase3);
ShowInstallerDialog(VFLI.i18n("RDX Installer"), VFLI.i18n("The following post-installation options are available:"), InstallPhase3);
else
InstallDone();
end
327,7 → 327,7
 
-- Step 5: Show the first install options screen and wait for user feedback before proceeding.
if(VFL.tsize(toggles) > 0) then
ShowInstallerDialog(VFLI.i18n("RDX6 Installer"), VFLI.i18n("RDX has detected packages to install. The following user options are available. Select Decline to decline all, or Cancel to close."), InstallPhase2, InstallFreeAll, InstallDone);
ShowInstallerDialog(VFLI.i18n("RDX Installer"), VFLI.i18n("RDX has detected packages to install. The following user options are available. Select Decline to decline all, or Cancel to close."), InstallPhase2, InstallFreeAll, InstallDone);
else
InstallPhase2();
end
434,7 → 434,10
end
end
-- If no oobes were loaded, peace out.
if(not loadedOOBEs) then return; end
if(not loadedOOBEs) then
RDX.InstallerDone();
return;
end
VFLT.ZMSchedule(2, DeferredInstaller);
end
 
trunk/RDX/DesktopMgr/DuiMenu.lua
162,6 → 162,22
ent.menuList = lockListMenu;
end);
 
--RDXPM.DuiMenu:RegisterMenuFunction(function(ent)
-- ent.text = "*******************";
-- ent.notCheckable = true;
-- ent.func = VFL.Noop;
--end);
 
--RDXPM.DuiMenu:RegisterMenuFunction(function(ent)
-- ent.text = VFLI.i18n("Wizards");
-- ent.hasArrow = true;
-- ent.notCheckable = true;
-- ent.menuList = {
-- { text = " " .. VFLI.i18n("Windows Wizard"), notCheckable = true, func = function() RDX.NewWindowWizard(); end; },
--
-- };
--end);
 
RDXPM.DuiMenu:RegisterMenuFunction(function(ent)
ent.text = "*******************";
ent.notCheckable = true;
trunk/RDX/DesktopMgr/FrameProps.lua
104,6 → 104,7
 
local dlg = nil;
function RDXDK.LayoutPropsDialog(frameprops)
if dlg then return; end
local dd, dgp = frameprops, (RDXDK.FindDockGroupParent(frameprops) or frameprops);
 
local x = nil;
trunk/RDX/DesktopMgr/BlizzardFullDisable.lua
845,6 → 845,10
end
end
 
function RDXDK.IsBlizzardManageOpen()
if dlg then return true; else return nil; end
end
 
local function disableblizz()
if opt then
if opt.ab then RDXDK.DisableActionBar(); end
trunk/RDX/RDX.toc
346,6 → 346,7
# Windows Wizard
Wizards\Wizard.lua
Wizards\WindowWizard.lua
Wizards\LearnWizard.lua
 
# Raid Logger
Raid\RaidLogger\Omni.lua
trunk/RDX/Init.lua
5,13 → 5,13
-- Initialization code.
--
 
--local initd = nil;
local installer = nil;
 
--- Is RDX initialized?
-- @return TRUE iff all RDX initialization procedures are complete.
--function RDX.IsInitialized()
-- return initd;
--end
function RDX.InstallerDone()
installer = true;
end
 
-- Preload: Called when RDX is finished loading, before saved variables and before modules.
local function Preload()
79,6 → 79,11
RDX:Debug(3, "DISPATCH INIT_DEFERRED");
RDXEvents:Dispatch("INIT_DEFERRED");
RDXEvents:DeleteKey("INIT_DEFERRED");
 
if not RDXG.hideLW and installer then
RDX.NewLearnWizard(RDXG.learnNum);
end
 
-- Now init smooth features.
--RDX.smooth = 0.2;
end);
trunk/RDX/Wizards/Wizard.lua
25,72 → 25,87
end
 
--- Open this wizard, displaying the first page.
function RDXUI.Wizard:Open(parent)
if self.window then return nil; end
function RDXUI.Wizard:Open(parent, num)
self.history = {}; self.desc._ok = nil;
if not self.window then
 
local win = VFLUI.Window:new(parent);
VFLUI.Window.SetDefaultFraming(win, 20);
win:SetBackdrop(VFLUI.BlackDialogBackdrop);
win:SetTitleColor(0,0,.6); win:SetText(self.title);
win:SetPoint("CENTER", VFLParent, "CENTER");
win:SetMovable(true); VFLUI.Window.StdMove(win, win:GetTitleBar());
win:SetClampedToScreen(true);
win:Show();
self.window = win;
local win = VFLUI.Window:new(parent);
VFLUI.Window.SetDefaultFraming(win, 20);
win:SetBackdrop(VFLUI.BlackDialogBackdrop);
win:SetTitleColor(0,0,.6); win:SetText(self.title);
win:SetPoint("TOPLEFT", VFLParent, "TOPLEFT", 100, -200);
--win:SetMovable(true);
VFLUI.Window.StdMove(win, win:GetTitleBar());
--win:SetClampedToScreen(true);
win:Show();
self.window = win;
 
local btn1 = VFLUI.Button:new(win);
btn1:SetHeight(25); btn1:SetWidth(60);
btn1:SetPoint("BOTTOMRIGHT", win:GetClientArea(), "BOTTOMRIGHT");
btn1:SetText(VFLI.i18n("Next >")); btn1:Show(); btn1:Disable();
self.nextBtn = btn1;
 
local btn = VFLUI.Button:new(win);
btn:SetHeight(25); btn:SetWidth(60);
btn:SetPoint("BOTTOMRIGHT", win:GetClientArea(), "BOTTOMRIGHT");
btn:SetText(VFLI.i18n("Next >")); btn:Show(); btn:Disable();
self.nextBtn = btn;
 
btn = VFLUI.Button:new(win);
btn:SetHeight(25); btn:SetWidth(60);
btn:SetPoint("RIGHT", self.nextBtn, "LEFT");
btn:SetText(VFLI.i18n("< Prev")); btn:Show(); btn:Disable();
btn:SetScript("OnClick", function()
if self.history then
local cp = table.remove(self.history);
if cp then
cp = table.remove(self.history);
local btn2 = VFLUI.Button:new(win);
btn2:SetHeight(25); btn2:SetWidth(60);
btn2:SetPoint("RIGHT", self.nextBtn, "LEFT");
btn2:SetText(VFLI.i18n("< Prev")); btn2:Show(); btn2:Disable();
btn2:SetScript("OnClick", function()
if self.history then
local cp = table.remove(self.history);
if cp then
self:SetPage(cp);
cp = table.remove(self.history);
if cp then
self:SetPage(cp);
end
end
end
end);
self.prevBtn = btn2;
 
local btn3 = VFLUI.CancelButton:new(win);
btn3:SetHeight(25); btn3:SetWidth(60);
btn3:SetPoint("RIGHT", self.prevBtn, "LEFT");
btn3:SetText(VFLI.i18n("Cancel")); btn3:Show(); btn3:Enable();
btn3:SetScript("OnClick", function() self:Close(nil); end);
self.cancelBtn = btn3;
 
local btn4 = VFLUI.OKButton:new(win);
btn4:SetHeight(25); btn4:SetWidth(60);
btn4:SetPoint("RIGHT", self.cancelBtn, "LEFT");
btn4:SetText(VFLI.i18n("OK")); btn4:Show(); btn4:Disable();
self.OKBtn = btn4;
 
win.Destroy = VFL.hook(function(s)
self:ClearPage();
self.nextBtn:Destroy(); self.nextBtn = nil;
self.prevBtn:Destroy(); self.prevBtn = nil;
self.cancelBtn:Destroy(); self.cancelBtn = nil;
self.OKBtn:Destroy(); self.OKBtn = nil;
self.window = nil; self.pageNum = nil;
end, win.Destroy);
 
end
 
self.window:Show();
 
if num then
i = 1;
while(true) do
if i == num then break; end
table.insert(self.history, i);
i=i+1;
end
end);
self.prevBtn = btn;
 
btn = VFLUI.CancelButton:new(win);
btn:SetHeight(25); btn:SetWidth(60);
btn:SetPoint("RIGHT", self.prevBtn, "LEFT");
btn:SetText(VFLI.i18n("Cancel")); btn:Show(); btn:Enable();
btn:SetScript("OnClick", function() self:Close(nil); end);
self.cancelBtn = btn;
 
btn = VFLUI.OKButton:new(win);
btn:SetHeight(25); btn:SetWidth(60);
btn:SetPoint("RIGHT", self.cancelBtn, "LEFT");
btn:SetText(VFLI.i18n("OK")); btn:Show(); btn:Disable();
self.OKBtn = btn;
 
win.Destroy = VFL.hook(function(s)
self:ClearPage();
self.nextBtn:Destroy(); self.nextBtn = nil;
self.prevBtn:Destroy(); self.prevBtn = nil;
self.cancelBtn:Destroy(); self.cancelBtn = nil;
self.OKBtn:Destroy(); self.OKBtn = nil;
self.window = nil; self.pageNum = nil;
end, win.Destroy);
end
 
self:SetPage(1);
self:SetPage(num or 1);
return true;
end
 
--- Close the wizard.
function RDXUI.Wizard:Close(result)
self.window:Destroy(); self.window = nil;
--self.window:Destroy(); self.window = nil;
self.window:Hide();
if result then
self:OnOK();
self.desc._ok = true;
119,8 → 134,8
local child = pgdef.OpenPage(self.window, self, self.desc[num]);
if not child then
-- If we're still on the same page, quash the page.
if self.pageNum == num then self.pageNum = nil; end
return;
-- if self.pageNum == num then self.pageNum = nil; end
-- return;
end
 
-- Add to history.
159,7 → 174,7
 
--- Clear and save whatever page is currently being displayed
function RDXUI.Wizard:ClearPage()
if(self.child) then
if (self.child) then
self.child:Destroy();
self.child.GetDescriptor = nil;
self.child = nil;
272,3 → 287,5
end
 
 
 
 
trunk/RDX/Wizards/LearnWizard.lua New file
0,0 → 1,211
-- LearnWizard.lua
-- OpenRDX
--
local ww = RDXUI.Wizard:new();
 
---------------------------------------------
-- Pg 1: Welcome
---------------------------------------------
ww:RegisterPage(1, {
OpenPage = function(parent, wizard, desc)
local page = RDXUI.GenerateStdWizardPage(parent, "Welcome to RDX 8");
 
local lbl = VFLUI.MakeLabel(nil, page, "This is the first time you are using RDX, this quick tutorial will help you to learn how to use RDX.\n\nYou can close this tutorial at any time.\nGo to the menu Settings to reopen this tutorial.");
lbl:SetWidth(250); lbl:SetHeight(90);
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20);
 
local chk_hideLW = VFLUI.Checkbox:new(page); chk_hideLW:Show();
chk_hideLW:SetHeight(20); chk_hideLW:SetWidth(200);
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
 
function page:GetDescriptor()
if RDXG then RDXG.hideLW = chk_hideLW:GetChecked(); end
return {};
end
 
page.Destroy = VFL.hook(function(s)
chk_hideLW:Destroy();
end, page.Destroy);
 
wizard:OnNext(function(wiz) wiz:SetPage(2); end);
--wizard:Final();
 
return page;
end;
Verify = function(desc, wizard, errs)
return true;
end;
});
 
ww:RegisterPage(2, {
OpenPage = function(parent, wizard, desc)
local page = RDXUI.GenerateStdWizardPage(parent, "RDX Main Menu");
 
local lbl = VFLUI.MakeLabel(nil, page, "You should see a small RDX icon in the center of the screen.\nYou can move it with the key shift.\n\n\nThe main menu is located on the top of your screen.\nSolo, Multi, UI, Repo, Settings\n\n\nMove your mouse on the main menu.");
lbl:SetWidth(250); lbl:SetHeight(150);
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20);
 
function page:GetDescriptor()
return {};
end
 
wizard:OnNext(function(wiz) wiz:SetPage(3); end);
 
return page;
end;
Verify = function(desc, wizard, errs)
return true;
end;
});
 
ww:RegisterPage(3, {
OpenPage = function(parent, wizard, desc)
local page = RDXUI.GenerateStdWizardPage(parent, "Customize the Main Menu");
 
local lbl = VFLUI.MakeLabel(nil, page, "Click on the menu Settings and select RDX Settings.");
lbl:SetWidth(250); lbl:SetHeight(90);
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20);
 
function page:GetDescriptor()
return {};
end
 
wizard:OnNext(function(wiz) wiz:SetPage(4); end);
 
return page;
end;
Verify = function(desc, wizard, errs)
--if not RDXPM.IsRDXManageOpen() then errs:AddError("Panel RDX Settings is not open."); end
return not errs:HasError();
end;
});
 
ww:RegisterPage(4, {
OpenPage = function(parent, wizard, desc)
local page = RDXUI.GenerateStdWizardPage(parent, "Customize the Main Menu");
 
local lbl = VFLUI.MakeLabel(nil, page, "You can disable the animation of the main menu, check the box Always show main panel\n\nYou can change the icon texture here. Click on the disk to save when finish.");
lbl:SetWidth(250); lbl:SetHeight(90);
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20);
 
function page:GetDescriptor()
return {};
end
 
wizard:OnNext(function(wiz) wiz:SetPage(5); end);
 
return page;
end;
Verify = function(desc, wizard, errs)
--if RDXPM.IsRDXManageOpen() then errs:AddError("Panel RDX Settings is still open."); end
return not errs:HasError();
end;
});
 
ww:RegisterPage(5, {
OpenPage = function(parent, wizard, desc)
local page = RDXUI.GenerateStdWizardPage(parent, "Hide Blizzard UI elements");
 
local lbl = VFLUI.MakeLabel(nil, page, "Click on the menu UI and select Blizzard Frame Manager.");
lbl:SetWidth(250); lbl:SetHeight(90);
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20);
 
RDXG.learnNum = 5;
 
function page:GetDescriptor()
return {};
end
 
wizard:OnNext(function(wiz) wiz:SetPage(6); end);
 
return page;
end;
Verify = function(desc, wizard, errs)
--if not RDXDK.IsBlizzardManageOpen() then errs:AddError("Panel Blizzard UI Element is not open."); end
return not errs:HasError();
end;
});
 
ww:RegisterPage(6, {
OpenPage = function(parent, wizard, desc)
local page = RDXUI.GenerateStdWizardPage(parent, "Hide Blizzard UI elements");
 
local lbl = VFLUI.MakeLabel(nil, page, "Check all elements and click on the button save.\n\nYour UI will be reload and should be empty except the chatframe blizzard.");
lbl:SetWidth(250); lbl:SetHeight(90);
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20);
 
RDXG.learnNum = 6;
 
function page:GetDescriptor()
return {};
end
 
wizard:OnNext(function(wiz) wiz:SetPage(7); end);
 
return page;
end;
Verify = function(desc, wizard, errs)
--if RDXDK.IsBlizzardManageOpen() then errs:AddError("Panel Blizzard UI Element is still open."); end
return not errs:HasError();
end;
});
 
ww:RegisterPage(7, {
OpenPage = function(parent, wizard, desc)
local page = RDXUI.GenerateStdWizardPage(parent, "Open windows on your UI");
 
local lbl = VFLUI.MakeLabel(nil, page, "Check all elements and click on the button disk to save your modifications.\n\nYour UI should be empty except the chatframe blizzard.");
lbl:SetWidth(250); lbl:SetHeight(90);
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20);
 
RDXG.learnNum = 7;
 
function page:GetDescriptor()
return {};
end
 
wizard:OnNext(function(wiz) wiz:SetPage(8); end);
 
return page;
end;
Verify = function(desc, wizard, errs)
--if RDXDK.IsBlizzardManageOpen() then errs:AddError("Panel Blizzard UI Element is still open."); end
return not errs:HasError();
end;
});
 
 
--------------------
-- Page 20 (done)
--------------------
ww:RegisterPage(20, {
OpenPage = function(parent, wizard, desc)
local page = RDXUI.GenerateStdWizardPage(parent, "Done!");
local lbl = VFLUI.MakeLabel(nil, page, "You have now entered all information necessary to create your window.\n\nIf you click OK, your window will be created and moved to the center of the screen.\n\nIf you choose Cancel, this process will be aborted and no changes will be made.");
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20);
lbl:SetWidth(250); lbl:SetHeight(110); lbl:SetJustifyV("TOP");
page:SetHeight(130);
 
wizard:Final();
return page;
end;
Verify = function(desc, wizard, errs)
return true;
end
});
 
 
function ww:OnOK()
--VFL.print("OnOK");
end
 
ww.title = "Learn RDX Wizard";
RDX.learnWizard = ww;
 
function RDX.NewLearnWizard(num)
RDX.learnWizard:SetDescriptor({});
RDX.learnWizard:Open(VFLDIALOG, num);
end
 
trunk/RDX/Wizards/WindowWizard.lua
6,7 → 6,7
-- LICENSE. UNLICENSED COPYING IS PROHIBITED.
--
-- Implementation of the Window Wizard.
local ww = RDXUI.Wizard:new();
local ww = RDXUI.Wizard:new();
 
---------------------------------------------
-- WIZARD PAGES
421,7 → 421,7
lbl:SetPoint("TOPLEFT", page, "TOPLEFT", 0, -20);
 
-- Design chooser box
local ofDesign = RDXDB.ObjectFinder:new(page, function(p,f,md) return (md and type(md) == "table" and md.ty=="UnitFrameType"); end);
local ofDesign = RDXDB.ObjectFinder:new(page, function(p,f,md) return (md and type(md) == "table" and md.ty=="Design"); end);
ofDesign:SetPoint("BOTTOM", page, "BOTTOM");
ofDesign:SetWidth(300); ofDesign:Show();
ofDesign:SetLabel("Frame type:");
trunk/RDX/Designs/Variables/PowerVar.lua
5,6 → 5,7
name = "Variable: Fractional mana (fm)";
title = "Vars Frac Power";
category = VFLI.i18n("Variables");
test = true;
multiple = true;
IsPossible = function(state)
if not state:Slot("DesignFrame") then return nil; end
21,9 → 22,16
return true;
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code) code:AppendCode([[
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local ]] .. desc.name .. [[, ]] .. desc.name .. [[_i = 0.5, 0.5;
]]);
else
code:AppendCode([[
local ]] .. desc.name .. [[, ]] .. desc.name .. [[_i = unit:FracPower(]] .. desc.powertype .. [[);
]]);
]]);
end
end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("POWER");
66,6 → 74,7
name = "Variable: Number power";
title = "Vars Number Power";
category = VFLI.i18n("Variables");
test = true;
multiple = true;
IsPossible = function(state)
if not state:Slot("DesignFrame") then return nil; end
81,9 → 90,16
return true;
end;
ApplyFeature = function(desc, state)
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code) code:AppendCode([[
state:Attach(state:Slot("EmitPaintPreamble"), true, function(code)
if desc.test then
code:AppendCode([[
local ]] .. desc.name .. [[, ]] .. desc.name .. [[_i = 3, 3;
]]);
else
code:AppendCode([[
local ]] .. desc.name .. [[, ]] .. desc.name .. [[_i = unit:Power(]] .. desc.powertype .. [[) or 0;
]]);
]]);
end
end);
local mux = state:GetContainingWindowState():GetSlotValue("Multiplexer");
local mask = mux:GetPaintMask("POWER");
trunk/RDX/Designs/Buttons/ActionButton.lua
14,7 → 14,9
x:SetScript("OnAttributeChanged", nil);
x:SetScript("OnDragStart", nil); x:SetScript("OnReceiveDrag", nil);
--VFLUI._CleanupButton(x);
VFLUI._CleanupLayoutFrame(x);
--VFLUI._CleanupLayoutFrame(x);
x:SetBackdrop(nil);
x:Hide(); x:SetParent(VFLParent); x:ClearAllPoints();
end,
function(_, key)
local f = nil;
25,9 → 27,10
return f;
end,
function(_, f) -- on acquired
f:ClearAllPoints();
f:EnableMouse(true);
f:Show();
--f:ClearAllPoints();
--f:EnableMouse(true);
--f:SetBackdrop(nil);
--f:Show();
end,
"key");
 
43,7 → 46,9
x:SetScript("OnAttributeChanged", nil);
x:SetScript("OnDragStart", nil); x:SetScript("OnReceiveDrag", nil);
--VFLUI._CleanupButton(x);
VFLUI._CleanupLayoutFrame(x);
--VFLUI._CleanupLayoutFrame(x);
x:SetBackdrop(nil);
x:Hide(); x:SetParent(VFLParent); x:ClearAllPoints();
end,
function(_, key)
local f = CreateFrame("CheckButton", "VFLButton" .. GetTmpId(), nil, "SecureActionButtonTemplate");
66,11 → 71,15
else
local infoType = GetCursorInfo();
if infoType then
self._texFlash:SetAlpha(1);
--self._texGloss:Show();
if self.usebs then
self._texFlash:SetAlpha(1);
--self._texGloss:Show();
end
else
--self._texGloss:Hide();
self._texFlash:SetAlpha(0);
if self.usebs then
--self._texGloss:Hide();
self._texFlash:SetAlpha(0);
end
end
end
end
79,33 → 88,43
 
local function ABHideGameTooltip(self)
GameTooltip:Hide();
--self._texGloss:Hide();
self._texFlash:SetAlpha(0);
if self.usebs then
--self._texGloss:Hide();
self._texFlash:SetAlpha(0);
end
self.IsShowingTooltip = nil;
end
 
RDXUI.ActionButton = {};
 
function RDXUI.ActionButton:new(parent, id, ebsflag, ebs, ebsos, ebhide, statesString, nbuttons, cd, showkey, showtooltip, anyup, selfcast)
function RDXUI.ActionButton:new(parent, id, size, usebs, ebs, usebkd, bkd, os, ebhide, statesString, nbuttons, cd, showkey, showtooltip, anyup, selfcast)
local self = nil;
if ebsflag then
if usebs then
self = VFLUI.SkinButton:new(parent, "SecureActionButtonBar", id);
if not self then self = VFLUI.SkinButton:new(parent, "SecureActionButtonBarTmp"); self.error = true; id = 200; end
self:SetWidth(size); self:SetHeight(size);
self:SetButtonSkin(ebs, true, true, true, true, true, true, false, true, true, true);
elseif usebkd then
self = VFLUI.BckButton:new(parent, "SecureActionButtonBar", id);
if not self then self = VFLUI.BckButton:new(parent, "SecureActionButtonBarTmp"); self.error = true; id = 200; end
self:SetWidth(size); self:SetHeight(size);
self:SetButtonBkd(bkd);
end
VFLUI.StdSetParent(self, parent);
self:SetFrameLevel(parent:GetFrameLevel());
--VFLUI.StdSetParent(self, parent);
--self:SetFrameLevel(parent:GetFrameLevel());
-- store the id 1 to 120 of the frame for keybinding.
-- This is not the action. A button id can have many action when using state.
self.id = id;
self.btype = "";
self.usebs = usebs;
self.usebkd = usebkd;
self.ebhide = ebhide;
self.showtooltip = showtooltip;
 
-- icon texture
self.icon = VFLUI.CreateTexture(self);
self.icon:SetPoint("TOPLEFT", self, "TOPLEFT", ebsos, -ebsos);
self.icon:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -ebsos, ebsos);
self.icon:SetPoint("TOPLEFT", self, "TOPLEFT", os, -os);
self.icon:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -os, os);
self.icon:SetTexCoord(0.08, 1-0.08, 0.08, 1-0.08);
self.icon:SetDrawLayer("ARTWORK", 2);
self.icon:Show();
181,7 → 200,11
end
 
local function UpdateState()
self._texFlash:SetVertexColor(1, 1, 1, 0);
if self.usebs then
self._texFlash:SetVertexColor(1, 1, 1, 0);
--elseif usebkd then
--self:SetBackdropBorderColor(1, 1, 1, 0);
end
if self.error then
self.icon:SetTexture("Interface\\InventoryItems\\WoWUnknownItem01.blp");
else
197,8 → 220,12
-- use when bar page changed, and the action is changed
local function UpdateNewAction()
self.action = self:GetAttribute("action");
self._texBorder:SetVertexColor(1, 1, 1, 1);
self._texGloss:SetVertexColor(1, 1, 1, 1);
if self.usebs then
self._texBorder:SetVertexColor(1, 1, 1, 1);
self._texGloss:SetVertexColor(1, 1, 1, 1);
elseif self.usebkd then
self:SetBackdropBorderColor(1, 1, 1, 1);
end
if not self.action then return; end
if HasAction(self.action) then
WoWEvents:Unbind("actionButton" .. self.id);
242,28 → 269,52
VFLT.AdaptiveUnschedule("ScheduleactionButton" .. id);
VFLT.AdaptiveSchedule("ScheduleactionButton" .. id, 0.1, function()
if self.ga then
self._texBorder:SetVertexColor(1, 0.5, 0, 0.8);
self._texGloss:SetVertexColor(1, 0.5, 0, 0.8);
if self.usebs then
self._texBorder:SetVertexColor(1, 0.5, 0, 0.8);
self._texGloss:SetVertexColor(1, 0.5, 0, 0.8);
elseif self.usebkd then
self:SetBackdropBorderColor(1, 0.5, 0, 0.8);
end
-- current action yellow color
elseif self.ca then
self._texBorder:SetVertexColor(1, 1, 0, 0.8);
self._texGloss:SetVertexColor(1, 1, 0, 0.8);
if self.usebs then
self._texBorder:SetVertexColor(1, 1, 0, 0.8);
self._texGloss:SetVertexColor(1, 1, 0, 0.8);
elseif self.usebkd then
self:SetBackdropBorderColor(1, 1, 0, 0.8);
end
-- out of range red color
elseif IsActionInRange(self.action) == 0 then
self._texBorder:SetVertexColor(1, 0, 0, 0.8);
self._texGloss:SetVertexColor(1, 0, 0, 0.8);
if self.usebs then
self._texBorder:SetVertexColor(1, 0, 0, 0.8);
self._texGloss:SetVertexColor(1, 0, 0, 0.8);
elseif self.usebkd then
self:SetBackdropBorderColor(1, 0, 0, 0.8);
end
-- out of mana blue color
elseif self.ua then
self._texBorder:SetVertexColor(0, 0, 1, 0.8);
self._texGloss:SetVertexColor(0, 0, 1, 0.8);
if self.usebs then
self._texBorder:SetVertexColor(0, 0, 1, 0.8);
self._texGloss:SetVertexColor(0, 0, 1, 0.8);
elseif self.usebkd then
self:SetBackdropBorderColor(0, 0, 1, 0.8);
end
-- equipement item green color
elseif self.ea then
self._texBorder:SetVertexColor(0, 1, 0, 0.35);
self._texGloss:SetVertexColor(0, 1, 0, 0.35);
if self.usebs then
self._texBorder:SetVertexColor(0, 1, 0, 0.35);
self._texGloss:SetVertexColor(0, 1, 0, 0.35);
elseif self.usebkd then
self:SetBackdropBorderColor(0, 1, 0, 0.35);
end
-- default color
else
self._texBorder:SetVertexColor(1, 1, 1, 1);
self._texGloss:SetVertexColor(1, 1, 1, 1);
if self.usebs then
self._texBorder:SetVertexColor(1, 1, 1, 1);
self._texGloss:SetVertexColor(1, 1, 1, 1);
elseif self.usebkd then
self:SetBackdropBorderColor(1, 1, 1, 1);
end
end
end);
else
273,9 → 324,13
end
-- Button Skin Hide
if self.ebhide and (not HasAction(self.action)) then
self:bsHide();
--if usebs then
self:bsHide();
--end
else
self:bsShow();
--if usebs then
self:bsShow();
--end
end
if self.IsShowingTooltip then ABShowGameTooltip(self); end
end
421,6 → 476,8
s.ua = nil;
s.ea = nil;
s.flash = nil;
s.usebs = nil;
s.usebkd = nil;
s.ebhide = nil;
s.btype = nil;
s.action = nil;
437,26 → 494,33
-------------------------------------------
RDXUI.MultiCastButton = {};
 
function RDXUI.MultiCastButton:new(parent, id, ebsflag, ebs, ebsos, ebhide, statesString, nbuttons, cd, showkey, showtooltip, anyup)
function RDXUI.MultiCastButton:new(parent, id, size, usebs, ebs, usebkd, bkd, os, ebhide, statesString, nbuttons, cd, showkey, showtooltip, anyup)
local self = nil;
if ebsflag then
if usebs then
self = VFLUI.SkinButton:new(parent, "SecureActionButtonBar", id);
if not self then self = VFLUI.SkinButton:new(parent, "SecureActionButtonBarTmp"); self.error = true; id = 200; end
self:SetButtonSkin(ebs, true, true, true, true, true, true, false, true, true, true);
elseif usebkd then
self = VFLUI.BckButton:new(parent, "SecureActionButtonBar", id);
if not self then self = VFLUI.BckButton:new(parent, "SecureActionButtonBarTmp"); self.error = true; id = 200; end
self:SetWidth(size); self:SetHeight(size);
self:SetButtonBkd(bkd);
end
VFLUI.StdSetParent(self, parent);
self:SetFrameLevel(parent:GetFrameLevel());
--VFLUI.StdSetParent(self, parent);
--self:SetFrameLevel(parent:GetFrameLevel());
-- store the id 1 to 120 of the frame for keybinding.
-- This is not the action. A button id can have many action when using state.
self.id = id;
self.btype = "";
self.usebs = usebs;
self.usebkd = usebkd;
self.ebhide = ebhide;
self.showtooltip = showtooltip;
 
-- icon texture
self.icon = VFLUI.CreateTexture(self);
self.icon:SetPoint("TOPLEFT", self, "TOPLEFT", ebsos, -ebsos);
self.icon:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -ebsos, ebsos);
self.icon:SetPoint("TOPLEFT", self, "TOPLEFT", os, -os);
self.icon:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -os, os);
self.icon:SetTexCoord(0.08, 1-0.08, 0.08, 1-0.08);
self.icon:SetDrawLayer("ARTWORK", 2);
self.icon:Show();
513,7 → 577,11
end
 
local function UpdateState()
self._texFlash:SetVertexColor(1, 1, 1, 0);
if self.usebs then
self._texFlash:SetVertexColor(1, 1, 1, 0);
--elseif usebkd then
--self:SetBackdropBorderColor(1, 1, 1, 0);
end
if self.error then
self.icon:SetTexture("Interface\\InventoryItems\\WoWUnknownItem01.blp");
else
529,8 → 597,12
-- use when bar page changed, and the action is changed
local function UpdateNewAction()
self.action = self:GetAttribute("action");
self._texBorder:SetVertexColor(1, 1, 1, 1);
self._texGloss:SetVertexColor(1, 1, 1, 1);
if self.usebs then
self._texBorder:SetVertexColor(1, 1, 1, 1);
self._texGloss:SetVertexColor(1, 1, 1, 1);
elseif self.usebkd then
self:SetBackdropBorderColor(1, 1, 1, 1);
end
if not self.action then return; end
if HasAction(self.action) then
WoWEvents:Unbind("multicastButton" .. self.id);
572,24 → 644,44
VFLT.AdaptiveSchedule("SchedulemulticastButton" .. id, 0.1, function()
-- current action yellow color
if self.ca then
self._texBorder:SetVertexColor(1, 1, 0, 0.8);
self._texGloss:SetVertexColor(1, 1, 0, 0.8);
if self.usebs then
self._texBorder:SetVertexColor(1, 1, 0, 0.8);
self._texGloss:SetVertexColor(1, 1, 0, 0.8);
elseif self.usebkd then
self:SetBackdropBorderColor(1, 1, 0, 0.8);
end
-- out of range red color
elseif IsActionInRange(self.action) == 0 then
self._texBorder:SetVertexColor(1, 0, 0, 0.8);
self._texGloss:SetVertexColor(1, 0, 0, 0.8);
if self.usebs then
self._texBorder:SetVertexColor(1, 0, 0, 0.8);
self._texGloss:SetVertexColor(1, 0, 0, 0.8);
elseif self.usebkd then
self:SetBackdropBorderColor(1, 0, 0, 0.8);
end
-- out of mana blue color
elseif self.ua then
self._texBorder:SetVertexColor(0, 0, 1, 0.8);
self._texGloss:SetVertexColor(0, 0, 1, 0.8);
if self.usebs then
self._texBorder:SetVertexColor(0, 0, 1, 0.8);
self._texGloss:SetVertexColor(0, 0, 1, 0.8);
elseif self.usebkd then
self:SetBackdropBorderColor(0, 0, 1, 0.8);
end
-- equipement item green color
elseif self.ea then
self._texBorder:SetVertexColor(0, 1, 0, 0.35);
self._texGloss:SetVertexColor(0, 1, 0, 0.35);
if self.usebs then
self._texBorder:SetVertexColor(0, 1, 0, 0.35);
self._texGloss:SetVertexColor(0, 1, 0, 0.35);
elseif self.usebkd then
self:SetBackdropBorderColor(0, 1, 0, 0.35);
end
-- default color
else
self._texBorder:SetVertexColor(1, 1, 1, 1);
self._texGloss:SetVertexColor(1, 1, 1, 1);
if self.usebs then
self._texBorder:SetVertexColor(1, 1, 1, 1);
self._texGloss:SetVertexColor(1, 1, 1, 1);
elseif self.usebkd then
self:SetBackdropBorderColor(1, 1, 1, 1);
end
end
end);
else
726,6 → 818,8
s.ua = nil;
s.ea = nil;
s.flash = nil;
s.usebs = nil;
s.usebkd = nil;
s.ebhide = nil;
s.btype = nil;
s.action = nil;
745,7 → 839,9
if (not x) then return; end
x:SetScript("OnDragStart", nil); x:SetScript("OnReceiveDrag", nil);
--VFLUI._CleanupButton(x);
VFLUI._CleanupLayoutFrame(x);
--VFLUI._CleanupLayoutFrame(x);
x:SetBackdrop(nil);
x:Hide(); x:SetParent(VFLParent); x:ClearAllPoints();
end,
function(_, key)
local f = nil;
755,7 → 851,13
end
return f;
end,
VFL.Noop, "key");
function(_, f) -- on acquired
f:ClearAllPoints();
f:EnableMouse(true);
f:SetBackdrop(nil);
f:Show();
end,
"key");
 
function ABPShowGameTooltip(self)
if ( not self.tooltipName ) then
779,12 → 881,18
 
RDXUI.PetActionButton = {};
 
function RDXUI.PetActionButton:new(parent, id, ebsflag, ebs, ebsos, ebhide, statesString, nbuttons, cd, showkey, showtooltip, anyup)
function RDXUI.PetActionButton:new(parent, id, size, usebs, ebs, usebkd, bkd, os, ebhide, statesString, nbuttons, cd, showkey, showtooltip, anyup)
local self = nil;
if ebsflag then
if usebs then
self = VFLUI.SkinButton:new(parent, "SecureActionButtonPet", id);
if not self then self = VFLUI.SkinButton:new(parent, "SecureActionButtonBarTmp"); self.error = true; id = 400; end
self:SetWidth(size); self:SetHeight(size);
self:SetButtonSkin(ebs, true, true, true, true, true, true, false, true, true, true);
elseif usebkd then
self = VFLUI.BckButton:new(parent, "SecureActionButtonPet", id);
if not self then self = VFLUI.BckButton:new(parent, "SecureActionButtonBarTmp"); self.error = true; id = 400; end
self:SetWidth(size); self:SetHeight(size);
self:SetButtonBkd(bkd);
end
VFLUI.StdSetParent(self, parent);
self:SetFrameLevel(parent:GetFrameLevel());
792,12 → 900,14
-- This is not the action. A button id can have many action when using state.
self.id = id;
self.btype = "Pet";
self.usebs = usebs;
self.usebkd = usebkd;
self.ebhide = ebhide;
 
-- icon texture
self.icon = VFLUI.CreateTexture(self);
self.icon:SetPoint("TOPLEFT", self, "TOPLEFT", ebsos, -ebsos);
self.icon:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -ebsos, ebsos);
self.icon:SetPoint("TOPLEFT", self, "TOPLEFT", os, -os);
self.icon:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -os, os);
self.icon:SetTexCoord(0.08, 1-0.08, 0.08, 1-0.08);
self.icon:SetDrawLayer("ARTWORK", 2);
self.icon:Show();
841,7 → 951,11
 
local name, subtext, texture, token, active, autocastallowed, autocastenabled = nil, nil, nil, nil, nil, nil, nil;
local function UpdateState()
self._texFlash:SetVertexColor(0, 0, 0, 0);
if self.usebs then
self._texFlash:SetVertexColor(0, 0, 0, 0);
--elseif usebkd then
-- self:SetBackdropBorderColor(0, 0, 0, 0);
end
self.icon:SetTexture(texture);
if active then
self.ca = true;
878,24 → 992,40
VFLT.AdaptiveSchedule("ScheduleactionButtonPet" .. self.id, 0.3, function()
-- current action yellow color
if self.ca then
self._texBorder:SetVertexColor(1, 1, 0, 0.8);
self._texGloss:SetVertexColor(1, 1, 0, 0.8);
if self.usebs then
self._texBorder:SetVertexColor(1, 1, 0, 0.8);
self._texGloss:SetVertexColor(1, 1, 0, 0.8);
elseif self.usebkd then
self:SetBackdropBorderColor(1, 1, 0, 0.8);
end
-- out of range red color
--elseif IsActionInRange(action) == 0 then
-- self._texBorder:SetVertexColor(1, 0, 0, 0.8);
-- self._texGloss:SetVertexColor(1, 0, 0, 0.8);
-- out of mana blue color
elseif self.ua then
self._texBorder:SetVertexColor(0, 0, 1, 0.8);
self._texGloss:SetVertexColor(0, 0, 1, 0.8);
if self.usebs then
self._texBorder:SetVertexColor(0, 0, 1, 0.8);
self._texGloss:SetVertexColor(0, 0, 1, 0.8);
elseif self.usebkd then
self:SetBackdropBorderColor(0, 0, 1, 0.8);
end
-- local spell
elseif self.ea and autocastenabled then
self._texBorder:SetVertexColor(0, 1, 0, 0.35);
self._texGloss:SetVertexColor(0, 1, 0, 0.35);
if self.usebs then
self._texBorder:SetVertexColor(0, 1, 0, 0.35);
self._texGloss:SetVertexColor(0, 1, 0, 0.35);
elseif self.usebkd then
self:SetBackdropBorderColor(0, 1, 0, 0.35);
end
-- default color
else
self._texBorder:SetVertexColor(1, 1, 1, 1);
self._texGloss:SetVertexColor(1, 1, 1, 1);
if self.usebs then
self._texBorder:SetVertexColor(1, 1, 1, 1);
self._texGloss:SetVertexColor(1, 1, 1, 1);
elseif self.usebkd then
self:SetBackdropBorderColor(1, 1, 1, 1);
end
end
end);
else
1033,6 → 1163,8
s.ua = nil;
s.ea = nil;
s.flash = nil;
s.usebs = nil;
s.usebkd = nil;
s.ebhide = nil;
s.btype = nil;
end, self.Destroy);
1047,7 → 1179,9
VFLUI.CreateFramePool("SecureActionButtonStance", function(pool, x)
if (not x) then return; end
--VFLUI._CleanupButton(x);
VFLUI._CleanupLayoutFrame(x);
--VFLUI._CleanupLayoutFrame(x);
x:SetBackdrop(nil);
x:Hide(); x:SetParent(VFLParent); x:ClearAllPoints();
end, function(_, key)
local f = nil;
if key > 0 and key < 11 then
1079,23 → 1213,32
 
RDXUI.StanceButton = {};
 
function RDXUI.StanceButton:new(parent, id, ebsflag, ebs, ebsos, ebhide, statesString, nbuttons, cd, showkey, showtooltip)
function RDXUI.StanceButton:new(parent, id, size, usebs, ebs, usebkd, bkd, os, ebhide, statesString, nbuttons, cd, showkey, showtooltip)
local self = nil;
if ebsflag then
if usebs then
self = VFLUI.SkinButton:new(parent, "SecureActionButtonStance", id);
if not self then self = VFLUI.SkinButton:new(parent, "SecureActionButtonBarTmp"); self.error = true; id = 300; end
self:SetWidth(size); self:SetHeight(size);
self:SetButtonSkin(ebs, true, true, true, true, true, true, false, true, true, true);
elseif usebkd then
self = VFLUI.BckButton:new(parent, "SecureActionButtonStance", id);
if not self then self = VFLUI.BckButton:new(parent, "SecureActionButtonBarTmp"); self.error = true; id = 200; end
self:SetWidth(size); self:SetHeight(size);
self:SetButtonBkd(bkd);
end
VFLUI.StdSetParent(self, parent);
self:SetFrameLevel(parent:GetFrameLevel());
--VFLUI.StdSetParent(self, parent);
--self:SetFrameLevel(parent:GetFrameLevel());
 
self.id = id;
self.btype = "Stance";
self.usebs = usebs;
self.usebkd = usebkd;
self.ebhide = ebhide;
 
-- icon texture
self.icon = VFLUI.CreateTexture(self);
self.icon:SetPoint("TOPLEFT", self, "TOPLEFT", ebsos, -ebsos);
self.icon:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -ebsos, ebsos);
self.icon:SetPoint("TOPLEFT", self, "TOPLEFT", os, -os);
self.icon:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -os, os);
self.icon:SetTexCoord(0.08, 1-0.08, 0.08, 1-0.08);
self.icon:SetDrawLayer("ARTWORK", 2);
self.icon:Show();
1126,14 → 1269,26
local texture, name, isActive, isCastable = "", nil, nil, nil;
local function UpdateState()
texture, name, isActive, isCastable = GetShapeshiftFormInfo(self.id);
self._texFlash:SetVertexColor(0, 0, 0, 0);
if self.usebs then
self._texFlash:SetVertexColor(0, 0, 0, 0);
elseif usebkd then
self:SetBackdropBorderColor(0, 0, 0, 0);
end
self.icon:SetTexture(texture);
if isActive then
self._texBorder:SetVertexColor(1, 1, 0, 0.8);
self._texGloss:SetVertexColor(1, 1, 0, 0.8);
if self.usebs then
self._texBorder:SetVertexColor(1, 1, 0, 0.8);
self._texGloss:SetVertexColor(1, 1, 0, 0.8);
elseif usebkd then
self:SetBackdropBorderColor(1, 1, 0, 0.8);
end
else
self._texBorder:SetVertexColor(1, 1, 1, 1);
self._texGloss:SetVertexColor(1, 1, 1, 1);
if self.usebs then
self._texBorder:SetVertexColor(1, 1, 1, 1);
self._texGloss:SetVertexColor(1, 1, 1, 1);
elseif usebkd then
self:SetBackdropBorderColor(1, 1, 1, 1);
end
end
if isCastable then
self.icon:SetAlpha(1);
1248,6 → 1403,9
s.frtxt:Destroy(); s.frtxt = nil;
s.cd:Destroy(); s.cd = nil;
s.id = nil;
s.usebs = nil;
s.usebkd = nil;
s.ebhide = nil;
s.btype = nil;
end, self.Destroy);
 
1260,20 → 1418,31
 
RDXUI.ActionButtonTest = {};
 
function RDXUI.ActionButtonTest:new(parent, id, ebsflag, ebs, ebsos, ebhide, statesString, nbuttons, cd, showkey, showtooltip, anyup)
function RDXUI.ActionButtonTest:new(parent, id, size, usebs, ebs, usebkd, bkd, os, ebhide, statesString, nbuttons, cd, showkey, showtooltip, anyup)
local self = nil;
if ebsflag then
if usebs then
self = VFLUI.SkinButton:new(parent, "SecureActionButtonBarTmp"); id = 400;
if not self then self = VFLUI.SkinButton:new(parent, "SecureActionButtonBarTmp"); self.error = true; id = 400; end
self:SetWidth(size); self:SetHeight(size);
self:SetButtonSkin(ebs, true, true, false, true, true, true, false, true, true, true);
elseif usebkd then
self = VFLUI.BckButton:new(parent, "SecureActionButtonBar", id);
if not self then self = VFLUI.BckButton:new(parent, "SecureActionButtonBarTmp"); self.error = true; id = 400; end
self:SetWidth(size); self:SetHeight(size);
self:SetButtonBkd(bkd);
end
VFLUI.StdSetParent(self, parent);
self:SetFrameLevel(parent:GetFrameLevel());
--VFLUI.StdSetParent(self, parent);
--self:SetFrameLevel(parent:GetFrameLevel());
-- store the id 1 to 10 of the frame for keybinding.
 
self.usebs = usebs;
self.usebkd = usebkd;
self.ebhide = ebhide;
 
-- icon texture
self.icon = VFLUI.CreateTexture(self);
self.icon:SetPoint("TOPLEFT", self, "TOPLEFT", ebsos, -ebsos);
self.icon:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -ebsos, ebsos);
self.icon:SetPoint("TOPLEFT", self, "TOPLEFT", os, -os);
self.icon:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -os, os);
self.icon:SetTexCoord(0.08, 1-0.08, 0.08, 1-0.08);
self.icon:SetDrawLayer("ARTWORK", 2);
self.icon:Show();
1304,6 → 1473,9
s.frtxt:Destroy(); s.frtxt = nil;
VFLUI.ReleaseRegion(s.icon); s.icon = nil;
s.cd:Destroy(); s.cd = nil;
s.usebs = nil;
s.usebkd = nil;
s.ebhide = nil;
end, self.Destroy);
 
return self;
1318,7 → 1490,9
if (not x) then return; end
--x:SetScript("OnDragStart", nil); x:SetScript("OnReceiveDrag", nil);
--VFLUI._CleanupButton(x);
VFLUI._CleanupLayoutFrame(x);
--VFLUI._CleanupLayoutFrame(x);
x:SetBackdrop(nil);
x:Hide(); x:SetParent(VFLParent); x:ClearAllPoints();
end,
function(_, key)
local f = nil;
1352,23 → 1526,31
 
RDXUI.VehicleButton = {};
 
function RDXUI.VehicleButton:new(parent, id, ebsflag, ebs, ebsos, ebhide, statesString, nbuttons, testmode)
function RDXUI.VehicleButton:new(parent, id, size, usebs, ebs, usebkd, bkd, os, ebhide, statesString, nbuttons, testmode)
local self = nil;
if ebsflag then
if usebs then
self = VFLUI.SkinButton:new(parent, "ButtonVehicle", id);
if not self then self = VFLUI.SkinButton:new(parent, "SecureActionButtonBarTmp"); self.error = true; id = 400; end
self:SetWidth(size); self:SetHeight(size);
self:SetButtonSkin(ebs, true, true, false, true, true, true, false, false, true, true);
elseif usebkd then
self = VFLUI.BckButton:new(parent, "ButtonVehicle", id);
if not self then self = VFLUI.BckButton:new(parent, "SecureActionButtonBarTmp"); self.error = true; id = 200; end
self:SetWidth(size); self:SetHeight(size);
self:SetButtonBkd(bkd);
end
VFLUI.StdSetParent(self, parent);
self:SetFrameLevel(parent:GetFrameLevel());
--VFLUI.StdSetParent(self, parent);
--self:SetFrameLevel(parent:GetFrameLevel());
 
self.id = id;
self.btype = "Vehicle";
self.usebs = usebs;
self.usebkd = usebkd;
 
-- icon texture
self.icon = VFLUI.CreateTexture(self);
self.icon:SetPoint("TOPLEFT", self, "TOPLEFT", ebsos, -ebsos);
self.icon:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -ebsos, ebsos);
self.icon:SetPoint("TOPLEFT", self, "TOPLEFT", os, -os);
self.icon:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -os, os);
self.icon:SetTexCoord(0.08, 1-0.08, 0.08, 1-0.08);
self.icon:SetDrawLayer("ARTWORK", 2);
self.icon:Show();
1512,6 → 1694,9
s.frtxt:Destroy(); s.frtxt = nil;
s.id = nil;
s.btype = nil;
s.usebs = nil;
s.usebkd = nil;
s.ebhide = nil;
end, self.Destroy);
 
return self;
trunk/RDX/Designs/Buttons/MultiCastBar.lua
12,12 → 12,17
-- Create function
 
local function _EmitCreateCode(objname, desc)
local ebsflag, ebs, ebsos = "false", "bs_default", 0;
--if desc.externalButtonSkin then
ebsflag = "true";
ebs = desc.externalButtonSkin;
if desc.ButtonSkinOffset then ebsos = desc.ButtonSkinOffset; end
--end
local usebs = "false"; if desc.usebs then usebs = "true"; end
local ebs = desc.externalButtonSkin or "bs_default";
local usebkd = "false"; if desc.usebkd then usebkd = "true"; end
local bkd = desc.bkd or VFLUI.defaultBackdrop;
local os = 0;
if desc.usebs then
os = desc.ButtonSkinOffset or 0;
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 hidebs = "nil"; if desc.hidebs then hidebs = "true"; end
local showkey = "nil"; if desc.showkey then showkey = "true"; end
local showtooltip = "nil"; if desc.showtooltip then showtooltip = "true"; end
48,9 → 53,16
frame.]] .. objname .. [[ = {};
local dabid = nil;
-- Create Main button cast
local btn = VFLUI.SkinButton:new(btnOwner, "SecureUnitButton");
btn:SetWidth(]] .. desc.size .. [[); btn:SetHeight(]] .. desc.size .. [[);
btn:SetButtonSkin("]] .. ebs .. [[", true, true, false, true, true, true, false, true, true, true);
local btn;
if ]] .. usebs .. [[ then
btn = VFLUI.SkinButton:new(btnOwner, "SecureUnitButton");
btn:SetWidth(]] .. desc.size .. [[); btn:SetHeight(]] .. desc.size .. [[);
btn:SetButtonSkin("]] .. ebs .. [[", true, true, false, true, true, true, false, true, true, true);
elseif ]] .. usebkd .. [[ then
btn = VFLUI.BckButton:new(btnOwner, "SecureUnitButton");
btn:SetWidth(]] .. desc.size .. [[); btn:SetHeight(]] .. desc.size .. [[);
self:SetButtonBkd(]] .. Serialize(bkd) .. [[);
end
btn:Show();
btn:RegisterForClicks("AnyDown");
btn:SetAttribute("unit", "player");
58,8 → 70,8
btn:SetAttribute("spell", ]] .. spell .. [[);
 
btn.icon = VFLUI.CreateTexture(btn);
btn.icon:SetPoint("TOPLEFT", btn, "TOPLEFT", ]] .. ebsos .. [[, -]] .. ebsos .. [[);
btn.icon:SetPoint("BOTTOMRIGHT", btn, "BOTTOMRIGHT", -]] .. ebsos .. [[, ]] .. ebsos .. [[);
btn.icon:SetPoint("TOPLEFT", btn, "TOPLEFT", ]] .. os .. [[, -]] .. os .. [[);
btn.icon:SetPoint("BOTTOMRIGHT", btn, "BOTTOMRIGHT", -]] .. os .. [[, ]] .. os .. [[);
btn.icon:SetTexCoord(0.08, 1-0.08, 0.08, 1-0.08);
btn.icon:SetDrawLayer("ARTWORK", 2);
btn.icon:SetTexture("]] .. icontex .. [[");
68,7 → 80,7
frame.]] .. objname .. [[[1] = btn;
 
for i=2, ]] .. desc.nIcons .. [[ do
local btn = RDXUI.MultiCastButton:new(btnOwner, abid, ]] .. ebsflag .. [[, "]] .. ebs .. [[", ]] .. ebsos .. [[, ]] .. hidebs .. [[, "", ]] .. desc.nIcons .. [[, ]] .. Serialize(desc.cd) .. [[, ]] .. showkey .. [[, ]] .. showtooltip .. [[, ]] .. anyup .. [[);
local btn = RDXUI.MultiCastButton:new(btnOwner, abid, ]] .. desc.size .. [[, ]] .. usebs .. [[, "]] .. ebs .. [[", ]] .. usebkd .. [[, ]] .. Serialize(bkd) .. [[, ]] .. os .. [[, ]] .. hidebs .. [[, "", ]] .. desc.nIcons .. [[, ]] .. Serialize(desc.cd) .. [[, ]] .. showkey .. [[, ]] .. showtooltip .. [[, ]] .. anyup .. [[);
]];
createCode = createCode .. VFLUI.GenerateSetFontCode("btn.txtCount", desc.fontcount, nil, true);
createCode = createCode .. VFLUI.GenerateSetFontCode("btn.txtMacro", desc.fontmacro, nil, true);
79,7 → 91,6
else
dabid = abid;
end
btn:SetWidth(]] .. desc.size .. [[); btn:SetHeight(]] .. desc.size .. [[);
btn:Show();
frame.]] .. objname .. [[[i] = btn;
abid = abid + 1;
89,7 → 100,7
createCode = createCode .. RDXUI.LayoutCodeMultiRows(objname, desc);
createCode = createCode .. [[
if dabid then
RDX.printE("Multi Cast Button ".. dabid .." already used");
--RDX.printE("Multi Cast Button ".. dabid .." already used");
end
]];
return createCode;
115,6 → 126,7
ExposeFeature = function(desc, state, errs)
if not desc then VFL.AddError(errs, VFLI.i18n("Missing descriptor.")); return nil; end
if desc.owner == "Base" then desc.owner = "decor"; end
if not desc.usebkd then desc.usebs = true; end
if not desc.cd then desc.cd = VFL.copy(VFLUI.defaultCooldown); end
desc.nIcons = 5;
local flg = true;
222,27 → 234,37
if desc and desc.size then ed_size.editBox:SetText(desc.size); end
ui:InsertFrame(ed_size);
 
-------------- ButtonSkin
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Button Skin")));
-------------- Display
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Display")));
 
local chk_bs = VFLUI.CheckEmbedRight(ui, VFLI.i18n("Use Button Skin"));
local dd_buttonSkin = VFLUI.Dropdown:new(chk_bs, VFLUI.GetButtonSkinList);
dd_buttonSkin:SetWidth(150); dd_buttonSkin:Show();
if desc and desc.externalButtonSkin then
dd_buttonSkin:SetSelection(desc.externalButtonSkin);
if desc and desc.usebs then
chk_bs:SetChecked(true);
dd_buttonSkin:SetSelection(desc.externalButtonSkin);
else
chk_bs:SetChecked();
dd_buttonSkin:SetSelection("bs_default");
end
chk_bs:EmbedChild(dd_buttonSkin); chk_bs:Show();
ui:InsertFrame(chk_bs);
 
local ed_bs = VFLUI.LabeledEdit:new(ui, 50); ed_bs:Show();
ed_bs:SetText(VFLI.i18n("Button Skin, Icon size"));
ed_bs:SetText(VFLI.i18n("Button Skin Size Offset :"));
if desc and desc.ButtonSkinOffset then ed_bs.editBox:SetText(desc.ButtonSkinOffset); end
ui:InsertFrame(ed_bs);
 
local chk_bkd = VFLUI.CheckEmbedRight(ui, VFLI.i18n("Use Backdrop"));
local dd_backdrop = VFLUI.MakeBackdropSelectButton(chk_bkd, desc.bkd);
dd_backdrop:Show();
if desc and desc.usebkd then
chk_bkd:SetChecked(true);
else
chk_bkd:SetChecked();
end
chk_bkd:EmbedChild(dd_backdrop); chk_bkd:Show();
ui:InsertFrame(chk_bkd);
 
local chk_hidebs = VFLUI.Checkbox:new(ui); chk_hidebs:Show();
chk_hidebs:SetText(VFLI.i18n("Hide empty button"));
if desc and desc.hidebs then chk_hidebs:SetChecked(true); else chk_hidebs:SetChecked(); end
287,8 → 309,7
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("End")));
 
function ui:GetDescriptor()
local ebs = nil;
if chk_bs:GetChecked() then ebs = dd_buttonSkin:GetSelection(); end
if chk_bs:GetChecked() then chk_bkd:SetChecked(); end
return {
feature = "multicastbar"; version = 1;
name = ed_name.editBox:GetText();
303,9 → 324,12
iconspx = VFL.clamp(ed_iconspx.editBox:GetNumber(), -20, 200);
iconspy = VFL.clamp(ed_iconspy.editBox:GetNumber(), -20, 200);
size = VFL.clamp(ed_size.editBox:GetNumber(), 20, 100);
-- Skin
externalButtonSkin = ebs;
-- display
usebs = chk_bs:GetChecked();
externalButtonSkin = dd_buttonSkin:GetSelection();
ButtonSkinOffset = VFL.clamp(ed_bs.editBox:GetNumber(), 0, 50);
usebkd = chk_bkd:GetChecked();
bkd = dd_backdrop:GetSelectedBackdrop();
hidebs = chk_hidebs:GetChecked();
-- Cooldown
cd = cd:GetSelectedCooldown();
335,6 → 359,7
anchor = { lp = "TOPLEFT", af = "Base", rp = "TOPLEFT", dx = 0, dy = 0};
nIcons = 12; size = 36; rows = 1; orientation = "RIGHT"; iconspx = 5; iconspy = 0;
externalButtonSkin = "bs_default";
bkd = VFL.copy(VFLUI.defaultBackdrop);
ButtonSkinOffset = 0;
fontkey = fontk;
fontmacro = fontm;
trunk/RDX/Designs/Buttons/ActionBarPet.lua
5,12 → 5,17
-- Create function
 
local function _EmitCreateCode(objname, desc)
local ebsflag, ebs, ebsos = "false", "bs_default", 0;
--if desc.externalButtonSkin then
ebsflag = "true";
ebs = desc.externalButtonSkin;
if desc.ButtonSkinOffset then ebsos = desc.ButtonSkinOffset; end
--end
local usebs = "false"; if desc.usebs then usebs = "true"; end
local ebs = desc.externalButtonSkin or "bs_default";
local usebkd = "false"; if desc.usebkd then usebkd = "true"; end
local bkd = desc.bkd or VFLUI.defaultBackdrop;
local os = 0;
if desc.usebs then
os = desc.ButtonSkinOffset or 0;
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 hidebs = "nil"; if desc.hidebs then hidebs = "true"; end
local showkey = "nil"; if desc.showkey then showkey = "true"; end
local showtooltip = "nil"; if desc.showtooltip then showtooltip = "true"; end
48,16 → 53,15
]];
if desc.test then
createCode = createCode .. [[
btn = RDXUI.ActionButtonTest:new(h, abid, ]] .. ebsflag .. [[, "]] .. ebs .. [[", ]] .. ebsos .. [[, ]] .. hidebs .. [[, statesString, nbuttons, ]] .. Serialize(desc.cd) .. [[, ]] .. showkey .. [[, ]] .. showtooltip .. [[, ]] .. anyup .. [[);
btn = RDXUI.ActionButtonTest:new(h, abid, ]] .. desc.size .. [[, ]] .. usebs .. [[, "]] .. ebs .. [[", ]] .. usebkd .. [[, ]] .. Serialize(bkd) .. [[, ]] .. os .. [[, ]] .. hidebs .. [[, statesString, nbuttons, ]] .. Serialize(desc.cd) .. [[, ]] .. showkey .. [[, ]] .. showtooltip .. [[, ]] .. anyup .. [[);
]];
else
createCode = createCode .. [[
btn = RDXUI.PetActionButton:new(h, abid, ]] .. ebsflag .. [[, "]] .. ebs .. [[", ]] .. ebsos .. [[, ]] .. hidebs .. [[, statesString, nbuttons, ]] .. Serialize(desc.cd) .. [[, ]] .. showkey .. [[, ]] .. showtooltip .. [[, ]] .. anyup .. [[);
btn = RDXUI.PetActionButton:new(h, abid, ]] .. desc.size .. [[, ]] .. usebs .. [[, "]] .. ebs .. [[", ]] .. usebkd .. [[, ]] .. Serialize(bkd) .. [[, ]] .. os .. [[, ]] .. hidebs .. [[, statesString, nbuttons, ]] .. Serialize(desc.cd) .. [[, ]] .. showkey .. [[, ]] .. showtooltip .. [[, ]] .. anyup .. [[);
]];
end
createCode = createCode .. [[
if btn then
btn:SetWidth(]] .. desc.size .. [[); btn:SetHeight(]] .. desc.size .. [[);
btn:Show();
]];
createCode = createCode .. VFLUI.GenerateSetFontCode("btn.txtHotkey", desc.fontkey, nil, true);
73,7 → 77,7
frame.]] .. objname .. [[header = h;
 
if dabid then
RDX.printW("Pet Button ".. abid .." already used, See feature ]] .. desc.name ..[[");
--RDX.printW("Pet Button ".. abid .." already used, See feature ]] .. desc.name ..[[");
else
]];
createCode = createCode .. RDXUI.LayoutCodeMultiRows(objname, desc);
99,6 → 103,7
ExposeFeature = function(desc, state, errs)
if not desc then VFL.AddError(errs, VFLI.i18n("Missing descriptor.")); return nil; end
if desc.owner == "Base" then desc.owner = "decor"; end
if not desc.usebkd then desc.usebs = true; end
if not desc.cd then desc.cd = VFL.copy(VFLUI.defaultCooldown); end
local flg = true;
flg = flg and RDXUI.UFFrameCheck_Proto("Frame_", desc, state, errs);
190,27 → 195,37
if desc and desc.size then ed_size.editBox:SetText(desc.size); end
ui:InsertFrame(ed_size);
 
-------------- ButtonSkin or Frame
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Button Skin")));
-------------- Display
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Display")));
 
local chk_bs = VFLUI.CheckEmbedRight(ui, VFLI.i18n("Use Button Skin"));
local dd_buttonSkin = VFLUI.Dropdown:new(chk_bs, VFLUI.GetButtonSkinList);
dd_buttonSkin:SetWidth(150); dd_buttonSkin:Show();
if desc and desc.externalButtonSkin then
dd_buttonSkin:SetSelection(desc.externalButtonSkin);
if desc and desc.usebs then
chk_bs:SetChecked(true);
dd_buttonSkin:SetSelection(desc.externalButtonSkin);
else
chk_bs:SetChecked();
dd_buttonSkin:SetSelection("bs_default");
end
chk_bs:EmbedChild(dd_buttonSkin); chk_bs:Show();
ui:InsertFrame(chk_bs);
 
local ed_bs = VFLUI.LabeledEdit:new(ui, 50); ed_bs:Show();
ed_bs:SetText(VFLI.i18n("Button Skin, Icon size"));
ed_bs:SetText(VFLI.i18n("Button Skin Size Offset :"));
if desc and desc.ButtonSkinOffset then ed_bs.editBox:SetText(desc.ButtonSkinOffset); end
ui:InsertFrame(ed_bs);
 
local chk_bkd = VFLUI.CheckEmbedRight(ui, VFLI.i18n("Use Backdrop"));
local dd_backdrop = VFLUI.MakeBackdropSelectButton(chk_bkd, desc.bkd);
dd_backdrop:Show();
if desc and desc.usebkd then
chk_bkd:SetChecked(true);
else
chk_bkd:SetChecked();
end
chk_bkd:EmbedChild(dd_backdrop); chk_bkd:Show();
ui:InsertFrame(chk_bkd);
 
local chk_hidebs = VFLUI.Checkbox:new(ui); chk_hidebs:Show();
chk_hidebs:SetText(VFLI.i18n("Hide empty button"));
if desc and desc.hidebs then chk_hidebs:SetChecked(true); else chk_hidebs:SetChecked(); end
245,8 → 260,7
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("End")));
 
function ui:GetDescriptor()
local ebs = nil;
if chk_bs:GetChecked() then ebs = dd_buttonSkin:GetSelection(); end
if chk_bs:GetChecked() then chk_bkd:SetChecked(); end
return {
feature = "actionbarpet"; version = 1;
name = ed_name.editBox:GetText();
261,9 → 275,12
iconspx = VFL.clamp(ed_iconspx.editBox:GetNumber(), -20, 200);
iconspy = VFL.clamp(ed_iconspy.editBox:GetNumber(), -20, 200);
size = VFL.clamp(ed_size.editBox:GetNumber(), 20, 100);
-- Skin
externalButtonSkin = ebs;
-- display
usebs = chk_bs:GetChecked();
externalButtonSkin = dd_buttonSkin:GetSelection();
ButtonSkinOffset = VFL.clamp(ed_bs.editBox:GetNumber(), 0, 50);
usebkd = chk_bkd:GetChecked();
bkd = dd_backdrop:GetSelectedBackdrop();
hidebs = chk_hidebs:GetChecked();
-- Cooldown
cd = cd:GetSelectedCooldown();
294,6 → 311,7
anchor = { lp = "TOPLEFT", af = "Base", rp = "TOPLEFT", dx = 0, dy = 0};
nIcons = 10; size = 36; rows = 1; orientation = "RIGHT"; iconspx = 5; iconspy = 0;
externalButtonSkin = "bs_default";
bkd = VFL.copy(VFLUI.defaultBackdrop);
ButtonSkinOffset = 0;
fontkey = fontk;
cd = VFL.copy(VFLUI.defaultCooldown);
trunk/RDX/Designs/Buttons/StanceBar.lua
7,12 → 7,17
local function _EmitCreateCode(objname, desc)
--desc.nIcons = GetNumShapeshiftForms();
desc.nIcons = 8;
local ebsflag, ebs, ebsos = "false", "bs_default", 0;
--if desc.externalButtonSkin then
ebsflag = "true";
ebs = desc.externalButtonSkin;
if desc.ButtonSkinOffset then ebsos = desc.ButtonSkinOffset; end
--end
local usebs = "false"; if desc.usebs then usebs = "true"; end
local ebs = desc.externalButtonSkin or "bs_default";
local usebkd = "false"; if desc.usebkd then usebkd = "true"; end
local bkd = desc.bkd or VFLUI.defaultBackdrop;
local os = 0;
if desc.usebs then
os = desc.ButtonSkinOffset or 0;
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 hidebs = "nil"; if desc.hidebs then hidebs = "true"; end
local showkey = "nil"; if desc.showkey then showkey = "true"; end
local showtooltip = "nil"; if desc.showtooltip then showtooltip = "true"; end
40,11 → 45,11
]];
if desc.test then
createCode = createCode .. [[
btn = RDXUI.ActionButtonTest:new(h, abid, ]] .. ebsflag .. [[, "]] .. ebs .. [[", ]] .. ebsos .. [[, ]] .. hidebs .. [[, statesString, nbuttons, ]] .. Serialize(desc.cd) .. [[, ]] .. showkey .. [[, ]] .. showtooltip .. [[);
local btn = RDXUI.ActionButtonTest:new(h, abid, ]] .. desc.size .. [[, ]] .. usebs .. [[, "]] .. ebs .. [[", ]] .. usebkd .. [[, ]] .. Serialize(bkd) .. [[, ]] .. os .. [[, ]] .. hidebs .. [[, statesString, nbuttons, ]] .. Serialize(desc.cd) .. [[, ]] .. showkey .. [[, ]] .. showtooltip .. [[);
]];
else
createCode = createCode .. [[
local btn = RDXUI.StanceButton:new(h, abid, ]] .. ebsflag .. [[, "]] .. ebs .. [[", ]] .. ebsos .. [[, ]] .. hidebs .. [[, statesString, ]] .. desc.nIcons .. [[, ]] .. Serialize(desc.cd) .. [[, ]] .. showkey .. [[, ]] .. showtooltip .. [[);
local btn = RDXUI.StanceButton:new(h, abid, ]] .. desc.size .. [[, ]] .. usebs .. [[, "]] .. ebs .. [[", ]] .. usebkd .. [[, ]] .. Serialize(bkd) .. [[, ]] .. os .. [[, ]] .. hidebs .. [[, statesString, ]] .. desc.nIcons .. [[, ]] .. Serialize(desc.cd) .. [[, ]] .. showkey .. [[, ]] .. showtooltip .. [[);
]];
end
createCode = createCode .. [[
53,7 → 58,6
createCode = createCode .. VFLUI.GenerateSetFontCode("btn.txtHotkey", desc.fontkey, nil, true);
createCode = createCode .. [[
if btn.Init then btn:Init(); end
btn:SetWidth(]] .. desc.size .. [[); btn:SetHeight(]] .. desc.size .. [[);
--btn:Show();
frame.]] .. objname .. [[[i] = btn;
abid = abid + 1;
68,7 → 72,7
createCode = createCode .. RDXUI.LayoutCodeMultiRows(objname, desc);
createCode = createCode .. [[
if dabid then
RDX.printW("Stance Button already used, See feature ]] .. desc.name ..[[");
--RDX.printW("Stance Button already used, See feature ]] .. desc.name ..[[");
end
 
]];
95,6 → 99,7
ExposeFeature = function(desc, state, errs)
if not desc then VFL.AddError(errs, VFLI.i18n("Missing descriptor.")); return nil; end
if desc.owner == "Base" then desc.owner = "decor"; end
if not desc.usebkd then desc.usebs = true; end
local flg = true;
flg = flg and RDXUI.UFFrameCheck_Proto("Frame_", desc, state, errs);
flg = flg and RDXUI.UFAnchorCheck(desc.anchor, state, errs);
182,27 → 187,37
if desc and desc.size then ed_size.editBox:SetText(desc.size); end
ui:InsertFrame(ed_size);
 
-------------- ButtonSkin or Frame
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Button Skin")));
-------------- Display
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Display")));
 
local chk_bs = VFLUI.CheckEmbedRight(ui, VFLI.i18n("Use Button Skin"));
local dd_buttonSkin = VFLUI.Dropdown:new(chk_bs, VFLUI.GetButtonSkinList);
dd_buttonSkin:SetWidth(150); dd_buttonSkin:Show();
if desc and desc.externalButtonSkin then
dd_buttonSkin:SetSelection(desc.externalButtonSkin);
if desc and desc.usebs then
chk_bs:SetChecked(true);
dd_buttonSkin:SetSelection(desc.externalButtonSkin);
else
chk_bs:SetChecked();
dd_buttonSkin:SetSelection("bs_default");
end
chk_bs:EmbedChild(dd_buttonSkin); chk_bs:Show();
ui:InsertFrame(chk_bs);
 
local ed_bs = VFLUI.LabeledEdit:new(ui, 50); ed_bs:Show();
ed_bs:SetText(VFLI.i18n("Button Skin, Icon size"));
ed_bs:SetText(VFLI.i18n("Button Skin Size Offset :"));
if desc and desc.ButtonSkinOffset then ed_bs.editBox:SetText(desc.ButtonSkinOffset); end
ui:InsertFrame(ed_bs);
 
local chk_bkd = VFLUI.CheckEmbedRight(ui, VFLI.i18n("Use Backdrop"));
local dd_backdrop = VFLUI.MakeBackdropSelectButton(chk_bkd, desc.bkd);
dd_backdrop:Show();
if desc and desc.usebkd then
chk_bkd:SetChecked(true);
else
chk_bkd:SetChecked();
end
chk_bkd:EmbedChild(dd_backdrop); chk_bkd:Show();
ui:InsertFrame(chk_bkd);
 
-------------- COOLDOWN
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Cooldown")));
local ercd = VFLUI.EmbedRight(ui, VFLI.i18n("Cooldown :"));
232,8 → 247,7
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("End")));
 
function ui:GetDescriptor()
local ebs = nil;
if chk_bs:GetChecked() then ebs = dd_buttonSkin:GetSelection(); end
if chk_bs:GetChecked() then chk_bkd:SetChecked(); end
return {
feature = "stancebar"; version = 1;
name = ed_name.editBox:GetText();
245,9 → 259,12
iconspx = VFL.clamp(ed_iconspx.editBox:GetNumber(), -20, 200);
iconspy = VFL.clamp(ed_iconspy.editBox:GetNumber(), -20, 200);
size = VFL.clamp(ed_size.editBox:GetNumber(), 20, 100);
-- Skin
externalButtonSkin = ebs;
-- display
usebs = chk_bs:GetChecked();
externalButtonSkin = dd_buttonSkin:GetSelection();
ButtonSkinOffset = VFL.clamp(ed_bs.editBox:GetNumber(), 0, 50);
usebkd = chk_bkd:GetChecked();
bkd = dd_backdrop:GetSelectedBackdrop();
-- Cooldown
cd = cd:GetSelectedCooldown();
cdTimerType = nil;
276,6 → 293,7
anchor = { lp = "TOPLEFT", af = "Base", rp = "TOPLEFT", dx = 0, dy = 0};
size = 36; rows = 1; orientation = "RIGHT"; iconspx = 5; iconspy = 0;
externalButtonSkin = "bs_default";
bkd = VFL.copy(VFLUI.defaultBackdrop);
ButtonSkinOffset = 0;
fontkey = fontk;
cd = VFL.copy(VFLUI.defaultCooldown);
trunk/RDX/Designs/Buttons/VehicleBar.lua
5,12 → 5,18
local function _EmitCreateCode2(objname, desc, winpath)
desc.nIcons = 3; desc.rows = 1;
if not desc.size then desc.size = 36; end
local ebsflag, ebs, ebsos = "false", "bs_default", 0;
--if desc.externalButtonSkin then
ebsflag = "true";
ebs = desc.externalButtonSkin;
if desc.ButtonSkinOffset then ebsos = desc.ButtonSkinOffset; end
--end
 
local usebs = "false"; if desc.usebs then usebs = "true"; end
local ebs = desc.externalButtonSkin or "bs_default";
local usebkd = "false"; if desc.usebkd then usebkd = "true"; end
local bkd = desc.bkd or VFLUI.defaultBackdrop;
local os = 0;
if desc.usebs then
os = desc.ButtonSkinOffset or 0;
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 showkey = "nil"; if desc.showkey then showkey = "true"; end
local test = "nil"; if desc.test then test = "true"; end
 
35,9 → 41,8
 
-- Create buttons
for i=1, ]] .. desc.nIcons .. [[ do
btn = RDXUI.VehicleButton:new(h, abid, ]] .. ebsflag .. [[, "]] .. ebs .. [[", ]] .. ebsos .. [[, nil, nil, ]] .. desc.nIcons .. [[, ]] .. test .. [[);
btn = RDXUI.VehicleButton:new(h, abid, ]] .. desc.size .. [[, ]] .. usebs .. [[, "]] .. ebs .. [[", ]] .. usebkd .. [[, ]] .. Serialize(bkd) .. [[, ]] .. os .. [[, nil, nil, ]] .. desc.nIcons .. [[, ]] .. test .. [[);
if btn then
btn:SetWidth(]] .. desc.size .. [[); btn:SetHeight(]] .. desc.size .. [[);
btn:Show();
]];
createCode = createCode .. VFLUI.GenerateSetFontCode("btn.txtHotkey", desc.fontkey, nil, true);
57,7 → 62,7
createCode = createCode .. RDXUI.LayoutCodeMultiRows(objname, desc);
createCode = createCode .. [[
if dabid then
RDX.printE("Vehicle Buttons already used, See window ]] .. winpath ..[[");
--RDX.printE("Vehicle Buttons already used, See window ]] .. winpath ..[[");
end
]];
return createCode;
77,6 → 82,7
ExposeFeature = function(desc, state, errs)
if not desc then VFL.AddError(errs, VFLI.i18n("Missing descriptor.")); return nil; end
if desc.owner == "Base" then desc.owner = "decor"; end
if not desc.usebkd then desc.usebs = true; end
local flg = true;
flg = flg and RDXUI.UFFrameCheck_Proto("Frame_", desc, state, errs);
flg = flg and RDXUI.UFAnchorCheck(desc.anchor, state, errs);
164,27 → 170,37
if desc and desc.size then ed_size.editBox:SetText(desc.size); end
ui:InsertFrame(ed_size);
 
-------------- ButtonSkin or Frame
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Button Skin")));
-------------- Display
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Display")));
 
local chk_bs = VFLUI.CheckEmbedRight(ui, VFLI.i18n("Use Button Skin"));
local dd_buttonSkin = VFLUI.Dropdown:new(chk_bs, VFLUI.GetButtonSkinList);
dd_buttonSkin:SetWidth(150); dd_buttonSkin:Show();
if desc and desc.externalButtonSkin then
dd_buttonSkin:SetSelection(desc.externalButtonSkin);
if desc and desc.usebs then
chk_bs:SetChecked(true);
dd_buttonSkin:SetSelection(desc.externalButtonSkin);
else
chk_bs:SetChecked();
dd_buttonSkin:SetSelection("bs_default");
end
chk_bs:EmbedChild(dd_buttonSkin); chk_bs:Show();
ui:InsertFrame(chk_bs);
 
local ed_bs = VFLUI.LabeledEdit:new(ui, 50); ed_bs:Show();
ed_bs:SetText(VFLI.i18n("Button Skin, Icon size"));
ed_bs:SetText(VFLI.i18n("Button Skin Size Offset :"));
if desc and desc.ButtonSkinOffset then ed_bs.editBox:SetText(desc.ButtonSkinOffset); end
ui:InsertFrame(ed_bs);
 
local chk_bkd = VFLUI.CheckEmbedRight(ui, VFLI.i18n("Use Backdrop"));
local dd_backdrop = VFLUI.MakeBackdropSelectButton(chk_bkd, desc.bkd);
dd_backdrop:Show();
if desc and desc.usebkd then
chk_bkd:SetChecked(true);
else
chk_bkd:SetChecked();
end
chk_bkd:EmbedChild(dd_backdrop); chk_bkd:Show();
ui:InsertFrame(chk_bkd);
 
-------------- Display
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Display")));
 
202,8 → 218,7
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("End")));
 
function ui:GetDescriptor()
local ebs = nil;
if chk_bs:GetChecked() then ebs = dd_buttonSkin:GetSelection(); end
if chk_bs:GetChecked() then chk_bkd:SetChecked(); end
return {
feature = "vehiclebar"; version = 1;
name = ed_name.editBox:GetText();
215,9 → 230,12
iconspx = VFL.clamp(ed_iconspx.editBox:GetNumber(), -20, 200);
iconspy = VFL.clamp(ed_iconspy.editBox:GetNumber(), -20, 200);
size = VFL.clamp(ed_size.editBox:GetNumber(), 20, 100);
-- Skin
externalButtonSkin = ebs;
-- display
usebs = chk_bs:GetChecked();
externalButtonSkin = dd_buttonSkin:GetSelection();
ButtonSkinOffset = VFL.clamp(ed_bs.editBox:GetNumber(), 0, 50);
usebkd = chk_bkd:GetChecked();
bkd = dd_backdrop:GetSelectedBackdrop();
-- Display
fontkey = fontkey:GetSelectedFont();
showkey = chk_showkey:GetChecked();
236,6 → 254,7
anchor = { lp = "TOPLEFT", af = "Base", rp = "TOPLEFT", dx = 0, dy = 0};
size = 36; rows = 1; orientation = "RIGHT"; iconspx = 5; iconspy = 0;
externalButtonSkin = "bs_default";
cd = VFL.copy(VFLUI.defaultCooldown);
ButtonSkinOffset = 0;
fontkey = fontk;
};
trunk/RDX/Designs/Buttons/ActionBars.lua
5,13 → 5,17
-- Create function
 
local function _EmitCreateCode(objname, desc)
local ebsflag, ebs, ebsos = "false", "bs_default", 0;
--if desc.externalButtonSkin then
ebsflag = "true";
ebs = desc.externalButtonSkin;
if not ebs then ebs = "bs_default"; end
if desc.ButtonSkinOffset then ebsos = desc.ButtonSkinOffset; end
--end
local usebs = "false"; if desc.usebs then usebs = "true"; end
local ebs = desc.externalButtonSkin or "bs_default";
local usebkd = "false"; if desc.usebkd then usebkd = "true"; end
local bkd = desc.bkd or VFLUI.defaultBackdrop;
local os = 0;
if desc.usebs then
os = desc.ButtonSkinOffset or 0;
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 hidebs = "nil"; if desc.hidebs then hidebs = "true"; end
local showkey = "nil"; if desc.showkey then showkey = "true"; end
local showtooltip = "nil"; if desc.showtooltip then showtooltip = "true"; end
50,7 → 54,7
 
-- Create buttons
for i=1, ]] .. desc.nIcons .. [[ do
local btn = RDXUI.ActionButton:new(h, abid, ]] .. ebsflag .. [[, "]] .. ebs .. [[", ]] .. ebsos .. [[, ]] .. hidebs .. [[, "]] .. headerstate .. [[", ]] .. desc.nIcons .. [[, ]] .. Serialize(desc.cd) .. [[, ]] .. showkey .. [[, ]] .. showtooltip .. [[, ]] .. anyup .. [[, ]] .. selfcast .. [[);
local btn = RDXUI.ActionButton:new(h, abid, ]] .. desc.size .. [[, ]] .. usebs .. [[, "]] .. ebs .. [[", ]] .. usebkd .. [[, ]] .. Serialize(bkd) .. [[, ]] .. os .. [[, ]] .. hidebs .. [[, "]] .. headerstate .. [[", ]] .. desc.nIcons .. [[, ]] .. Serialize(desc.cd) .. [[, ]] .. showkey .. [[, ]] .. showtooltip .. [[, ]] .. anyup .. [[, ]] .. selfcast .. [[);
]];
createCode = createCode .. VFLUI.GenerateSetFontCode("btn.txtCount", desc.fontcount, nil, true);
createCode = createCode .. VFLUI.GenerateSetFontCode("btn.txtMacro", desc.fontmacro, nil, true);
61,7 → 65,6
else
dabid = abid;
end
btn:SetWidth(]] .. desc.size .. [[); btn:SetHeight(]] .. desc.size .. [[);
btn:Show();
frame.]] .. objname .. [[[i] = btn;
abid = abid + 1;
113,6 → 116,7
ExposeFeature = function(desc, state, errs)
if not desc then VFL.AddError(errs, VFLI.i18n("Missing descriptor.")); return nil; end
if desc.owner == "Base" then desc.owner = "decor"; end
if not desc.usebkd then desc.usebs = true; end
if desc.headerstateType == "Custom" then
local test = __RDXconvertStatesTable(desc.headerstateCustom);
if #test == 0 then VFL.AddError(errs, VFLI.i18n("Custom definition invalid")); return nil; end
258,27 → 262,37
if desc and desc.size then ed_size.editBox:SetText(desc.size); end
ui:InsertFrame(ed_size);
 
-------------- ButtonSkin
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Button Skin")));
-------------- Display
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Display")));
 
local chk_bs = VFLUI.CheckEmbedRight(ui, VFLI.i18n("Use Button Skin"));
local dd_buttonSkin = VFLUI.Dropdown:new(chk_bs, VFLUI.GetButtonSkinList);
dd_buttonSkin:SetWidth(150); dd_buttonSkin:Show();
if desc and desc.externalButtonSkin then
dd_buttonSkin:SetSelection(desc.externalButtonSkin);
if desc and desc.usebs then
chk_bs:SetChecked(true);
dd_buttonSkin:SetSelection(desc.externalButtonSkin);
else
chk_bs:SetChecked();
dd_buttonSkin:SetSelection("bs_default");
end
chk_bs:EmbedChild(dd_buttonSkin); chk_bs:Show();
ui:InsertFrame(chk_bs);
 
local ed_bs = VFLUI.LabeledEdit:new(ui, 50); ed_bs:Show();
ed_bs:SetText(VFLI.i18n("Button Skin, Icon size"));
ed_bs:SetText(VFLI.i18n("Button Skin Size Offset :"));
if desc and desc.ButtonSkinOffset then ed_bs.editBox:SetText(desc.ButtonSkinOffset); end
ui:InsertFrame(ed_bs);
 
local chk_bkd = VFLUI.CheckEmbedRight(ui, VFLI.i18n("Use Backdrop"));
local dd_backdrop = VFLUI.MakeBackdropSelectButton(chk_bkd, desc.bkd);
dd_backdrop:Show();
if desc and desc.usebkd then
chk_bkd:SetChecked(true);
else
chk_bkd:SetChecked();
end
chk_bkd:EmbedChild(dd_backdrop); chk_bkd:Show();
ui:InsertFrame(chk_bkd);
 
local chk_hidebs = VFLUI.Checkbox:new(ui); chk_hidebs:Show();
chk_hidebs:SetText(VFLI.i18n("Hide empty button"));
if desc and desc.hidebs then chk_hidebs:SetChecked(true); else chk_hidebs:SetChecked(); end
323,8 → 337,7
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("End")));
 
function ui:GetDescriptor()
local ebs = nil;
if chk_bs:GetChecked() then ebs = dd_buttonSkin:GetSelection(); end
if chk_bs:GetChecked() then chk_bkd:SetChecked(); end
return {
feature = "actionbar"; version = 1;
name = ed_name.editBox:GetText();
343,9 → 356,12
iconspx = VFL.clamp(ed_iconspx.editBox:GetNumber(), -20, 200);
iconspy = VFL.clamp(ed_iconspy.editBox:GetNumber(), -20, 200);
size = VFL.clamp(ed_size.editBox:GetNumber(), 20, 100);
-- Skin
externalButtonSkin = ebs;
-- display
usebs = chk_bs:GetChecked();
externalButtonSkin = dd_buttonSkin:GetSelection();
ButtonSkinOffset = VFL.clamp(ed_bs.editBox:GetNumber(), 0, 50);
usebkd = chk_bkd:GetChecked();
bkd = dd_backdrop:GetSelectedBackdrop();
hidebs = chk_hidebs:GetChecked();
-- Cooldown
cd = cd:GetSelectedCooldown();
382,6 → 398,7
anchor = { lp = "TOPLEFT", af = "Base", rp = "TOPLEFT", dx = 0, dy = 0};
nIcons = 12; size = 36; rows = 1; orientation = "RIGHT"; iconspx = 5; iconspy = 0;
externalButtonSkin = "bs_default";
bkd = VFL.copy(VFLUI.defaultBackdrop);
ButtonSkinOffset = 0;
fontkey = fontk;
fontmacro = fontm;
trunk/RDX/Designs/Lists/AuraIconList.lua
41,32 → 41,44
 
--------------- Code emitter helpers
local function _EmitCreateCode(objname, desc)
local ebs, ebsos = "bs_default", 0;
if desc.externalButtonSkin then
ebs = desc.externalButtonSkin;
if desc.ButtonSkinOffset then ebsos = desc.ButtonSkinOffset; end
local usebs = "false"; if desc.usebs then usebs = "true"; end
local ebs = desc.externalButtonSkin or "bs_default";
local usebkd = "false"; if desc.usebkd then usebkd = "true"; end
local bkd = desc.bkd or VFLUI.defaultBackdrop;
local os = 0;
if desc.usebs then
os = desc.ButtonSkinOffset or 0;
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 createCode = [[
frame.]] .. objname .. [[ = {};
local btn, btnOwner = nil, ]] .. RDXUI.ResolveFrameReference(desc.owner) .. [[;
for i=1, ]] .. desc.nIcons .. [[ do
btn = VFLUI.SkinButton:new();
btn:SetButtonSkin("]] .. ebs ..[[", true, true, false, true, true, true, false, true, true, true);
if ]] .. usebs .. [[ then
btn = VFLUI.SkinButton:new();
btn:SetButtonSkin("]] .. ebs ..[[", true, true, false, true, true, true, false, true, true, true);
elseif ]] .. usebkd .. [[ then
btn = VFLUI.AcquireFrame("Frame");
VFLUI.SetBackdrop(btn, ]] .. Serialize(bkd) .. [[);
else
btn = VFLUI.AcquireFrame("Frame");
end
btn:SetParent(btnOwner); btn:SetFrameLevel(btnOwner:GetFrameLevel());
btn:SetWidth(]] .. desc.size .. [[); btn:SetHeight(]] .. desc.size .. [[);
btn:SetScript("OnEnter", __AuraIconOnEnter);
btn:SetScript("OnLeave", __AuraIconOnLeave);
]];
if desc.externalButtonSkin then createCode = createCode .. [[
btn:RegisterForClicks("RightButtonUp");
btn:SetScript("OnClick", __AuraIconOnClick);
--btn:RegisterForClicks("RightButtonUp");
--btn:SetScript("OnClick", __AuraIconOnClick);
]];
end
createCode = createCode .. [[
btn.tex = VFLUI.CreateTexture(btn);
btn.tex:SetPoint("TOPLEFT", btn, "TOPLEFT", ]] .. ebsos .. [[, -]] .. ebsos .. [[);
btn.tex:SetPoint("BOTTOMRIGHT", btn, "BOTTOMRIGHT", -]] .. ebsos .. [[, ]] .. ebsos .. [[);
btn.tex:SetPoint("TOPLEFT", btn, "TOPLEFT", ]] .. os .. [[, -]] .. os .. [[);
btn.tex:SetPoint("BOTTOMRIGHT", btn, "BOTTOMRIGHT", -]] .. os .. [[, ]] .. os .. [[);
btn.tex:SetTexCoord(0.08, 1-0.08, 0.08, 1-0.08);
btn.tex:SetDrawLayer("ARTWORK", 2);
btn.tex:Show();
116,6 → 128,7
if not desc.cd then desc.cd = VFL.copy(VFLUI.defaultCooldown); end
if not desc.iconspx then desc.iconspx = 0; end
if not desc.iconspy then desc.iconspy = 0; end
if not desc.usebkd then desc.usebs = true; end
local flg = true;
flg = flg and RDXUI.UFFrameCheck_Proto("Icons_", desc, state, errs);
flg = flg and RDXUI.UFAnchorCheck(desc.anchor, state, errs);
136,11 → 149,18
end;
ApplyFeature = function(desc, state)
local objname = "Icons_" .. desc.name;
local ebs, ebsos = "bs_default", 0;
if desc.externalButtonSkin then
ebs = desc.externalButtonSkin;
if desc.ButtonSkinOffset then ebsos = desc.ButtonSkinOffset; end
 
local usebs = "false"; if desc.usebs then usebs = "true"; end
local ebs = desc.externalButtonSkin or "bs_default";
local usebkd = "false"; if desc.usebkd then usebkd = "true"; end
local bkd = desc.bkd or VFLUI.defaultBackdrop;
local os = 0;
if desc.usebs then
os = desc.ButtonSkinOffset or 0;
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 loadCode = "LoadBuffFromUnit";
-- Event hinting.
local mux, mask = state:GetContainingWindowState():GetSlotValue("Multiplexer"), 0;
406,10 → 426,19
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(1, 1, 1, 1);
end
end
 
-- Cooldown
if _dur and _dur > 0 and btn.cd then
btn.cd:SetCooldown(GetTime() + _tl - _dur , _dur);
517,25 → 546,37
if desc and desc.size then ed_size.editBox:SetText(desc.size); end
ui:InsertFrame(ed_size);
 
-------------- ButtonSkin
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Button Skin")));
-------------- Display
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Display")));
 
local er = VFLUI.EmbedRight(ui, VFLI.i18n("Button Skin"));
local dd_buttonSkin = VFLUI.Dropdown:new(er, VFLUI.GetButtonSkinList);
local chk_bs = VFLUI.CheckEmbedRight(ui, VFLI.i18n("Use Button Skin"));
local dd_buttonSkin = VFLUI.Dropdown:new(chk_bs, VFLUI.GetButtonSkinList);
dd_buttonSkin:SetWidth(150); dd_buttonSkin:Show();
if desc and desc.externalButtonSkin then
dd_buttonSkin:SetSelection(desc.externalButtonSkin);
dd_buttonSkin:SetSelection(desc.externalButtonSkin);
if desc and desc.usebs then
chk_bs:SetChecked(true);
else
dd_buttonSkin:SetSelection("bs_default");
chk_bs:SetChecked();
end
er:EmbedChild(dd_buttonSkin); er:Show();
ui:InsertFrame(er);
chk_bs:EmbedChild(dd_buttonSkin); chk_bs:Show();
ui:InsertFrame(chk_bs);
 
local ed_bs = VFLUI.LabeledEdit:new(ui, 50); ed_bs:Show();
ed_bs:SetText(VFLI.i18n("Button Skin Size Offset :"));
if desc and desc.ButtonSkinOffset then ed_bs.editBox:SetText(desc.ButtonSkinOffset); end
ui:InsertFrame(ed_bs);
 
local chk_bkd = VFLUI.CheckEmbedRight(ui, VFLI.i18n("Use Backdrop"));
local dd_backdrop = VFLUI.MakeBackdropSelectButton(chk_bkd, desc.bkd);
dd_backdrop:Show();
if desc and desc.usebkd then
chk_bkd:SetChecked(true);
else
chk_bkd:SetChecked();
end
chk_bkd:EmbedChild(dd_backdrop); chk_bkd:Show();
ui:InsertFrame(chk_bkd);
 
-------------- CooldownDisplay
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Cooldown")));
local ercd = VFLUI.EmbedRight(ui, VFLI.i18n("Cooldown :"));
697,6 → 738,7
 
function ui:GetDescriptor()
local filterName, filterNameList, filternl, ext, unitfi, maxdurfil, mindurfil = nil, nil, {}, nil, "", "", "";
if chk_bs:GetChecked() then chk_bkd:SetChecked(); end
if chk_nameauras:GetChecked() then
unitfi = string.lower(ed_unitfilter.editBox:GetText());
end
757,9 → 799,11
iconspy = VFL.clamp(ed_iconspy.editBox:GetNumber(), -200, 200);
size = VFL.clamp(ed_size.editBox:GetNumber(), 1, 100);
-- display
usebs = chk_bs:GetChecked();
externalButtonSkin = dd_buttonSkin:GetSelection();
ButtonSkinOffset = VFL.clamp(ed_bs.editBox:GetNumber(), 0, 50);
bkd = nil;
usebkd = chk_bkd:GetChecked();
bkd = dd_backdrop:GetSelectedBackdrop();
-- cooldown
cd = cd:GetSelectedCooldown();
cdTimerType = nil;
813,36 → 857,11
anchor = { lp = "TOPLEFT", af = "Base", rp = "TOPLEFT", dx = 0, dy = 0};
nIcons = 4; size = 20; rows = 1; orientation = "RIGHT"; iconspx = 5; iconspy = 0;
cd = VFL.copy(VFLUI.defaultCooldown);
bkd = VFL.copy(VFLUI.defaultBackdrop);
externalButtonSkin = "bs_default";
ButtonSkinOffset = 0;
bkd = VFL.copy(VFLUI.defaultBackdrop);
};
end;
});
 
-----------------------------------
-- Updaters for old stuff.
-----------------------------------
RDX.RegisterFeature({
name = "Buff Icons"; version = 31337; invisible = true;
IsPossible = VFL.Nil;
VersionMismatch = function(desc)
local font = VFL.copy(Fonts.Default); font.size = 8;
desc.feature = "aura_icons"; desc.version = 1; desc.auraType = "BUFFS";
desc.owner = "Base";
desc.color = nil; desc.font = font; desc.text = "STACK";
end;
});
 
RDX.RegisterFeature({
name = "Debuff Icons"; version = 31337; invisible = true;
IsPossible = VFL.Nil;
VersionMismatch = function(desc)
local font = VFL.copy(Fonts.Default); font.size = 8;
desc.feature = "aura_icons"; desc.version = 1; desc.auraType = "DEBUFFS";
desc.owner = "Base";
desc.color = nil; desc.font = font; desc.text = "STACK";
end;
});
 
 
trunk/RDX/Designs/Lists/CustomIconList.lua
16,6 → 16,7
ExposeFeature = function(desc, state, errs)
if not desc then VFL.AddError(errs, VFLI.i18n("Missing descriptor.")); return nil; end
if desc.owner == "Base" then desc.owner = "decor"; end
if not desc.usebkd then desc.usebs = true; end
if (not desc.number) or (not state:Slot("NumberVar_" .. desc.number)) then
VFL.AddError(errs, VFLI.i18n("Invalid number object pointer.")); return nil;
end
29,11 → 30,15
end;
ApplyFeature = function(desc, state)
local objname = "Icons_" .. desc.name;
local ebsflag, ebs, ebsos = "false", "bs_default", 0;
if desc.externalButtonSkin then
ebsflag = "true";
ebs = desc.externalButtonSkin;
if desc.ButtonSkinOffset then ebsos = desc.ButtonSkinOffset; end
local usebs = "false"; if desc.usebs then usebs = "true"; end
local ebs = desc.externalButtonSkin or "bs_default";
local usebkd = "false"; if desc.usebkd then usebkd = "true"; end
local bkd = desc.bkd or VFLUI.defaultBackdrop;
local os = 0;
if desc.usebs then
os = desc.ButtonSkinOffset or 0;
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
if not desc.w then desc.w = 20; end
if not desc.h then desc.h = 20; end
57,17 → 62,20
frame.]] .. objname .. [[ = {};
btn, btnOwner = nil, ]] .. RDXUI.ResolveFrameReference(desc.owner) .. [[;
for i=1,]] .. desc.nIcons .. [[ do
if ]] .. ebsflag .. [[ then
if ]] .. usebs .. [[ then
btn = VFLUI.SkinButton:new();
btn:SetButtonSkin("]] .. ebs ..[[", true, true, false, true, true, true, false, true, true, true);
elseif ]] .. usebkd .. [[ then
btn = VFLUI.AcquireFrame("Frame");
VFLUI.SetBackdrop(btn, ]] .. Serialize(bkd) .. [[);
else
btn = VFLUI.AcquireFrame("Frame");
end
btn:SetParent(btnOwner); btn:SetFrameLevel(btnOwner:GetFrameLevel());
btn:SetWidth(]] .. desc.w .. [[); btn:SetHeight(]] .. desc.h .. [[);
btn.tex = VFLUI.CreateTexture(btn);
btn.tex:SetPoint("TOPLEFT", btn, "TOPLEFT", ]] .. ebsos .. [[, -]] .. ebsos .. [[);
btn.tex:SetPoint("BOTTOMRIGHT", btn, "BOTTOMRIGHT", -]] .. ebsos .. [[, ]] .. ebsos .. [[);
btn.tex:SetPoint("TOPLEFT", btn, "TOPLEFT", ]] .. os .. [[, -]] .. os .. [[);
btn.tex:SetPoint("BOTTOMRIGHT", btn, "BOTTOMRIGHT", -]] .. os .. [[, ]] .. os .. [[);
btn.tex:SetTexCoord(0.08, 1-0.08, 0.08, 1-0.08);
btn.tex:SetDrawLayer("ARTWORK", 2);
btn.tex:Show();
183,18 → 191,18
ed_height:SetText(VFLI.i18n("Height"));
if desc and desc.h then ed_height.editBox:SetText(desc.h); else ed_height.editBox:SetText("20"); end
ui:InsertFrame(ed_height);
-------------- ButtonSkin
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Button Skin")));
 
-------------- Display
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Display")));
 
local chk_bs = VFLUI.CheckEmbedRight(ui, VFLI.i18n("Use Button Skin"));
local dd_buttonSkin = VFLUI.Dropdown:new(chk_bs, VFLUI.GetButtonSkinList);
dd_buttonSkin:SetWidth(150); dd_buttonSkin:Show();
if desc and desc.externalButtonSkin then
dd_buttonSkin:SetSelection(desc.externalButtonSkin);
if desc and desc.usebs then
chk_bs:SetChecked(true);
dd_buttonSkin:SetSelection(desc.externalButtonSkin);
else
chk_bs:SetChecked();
dd_buttonSkin:SetSelection("bs_default");
end
chk_bs:EmbedChild(dd_buttonSkin); chk_bs:Show();
ui:InsertFrame(chk_bs);
204,7 → 212,19
if desc and desc.ButtonSkinOffset then ed_bs.editBox:SetText(desc.ButtonSkinOffset); end
ui:InsertFrame(ed_bs);
 
local chk_bkd = VFLUI.CheckEmbedRight(ui, VFLI.i18n("Use Backdrop"));
local dd_backdrop = VFLUI.MakeBackdropSelectButton(chk_bkd, desc.bkd);
dd_backdrop:Show();
if desc and desc.usebkd then
chk_bkd:SetChecked(true);
else
chk_bkd:SetChecked();
end
chk_bkd:EmbedChild(dd_backdrop); chk_bkd:Show();
ui:InsertFrame(chk_bkd);
 
-------------- Data source
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Datasource")));
 
local number = RDXUI.MakeSlotSelectorDropdown(ui, VFLI.i18n("Number"), state, "NumberVar_");
if desc and desc.number then number:SetSelection(desc.number); end
236,8 → 256,7
if desc and desc.color5 then color5:SetColor(VFL.explodeRGBA(desc.color5)); end
 
function ui:GetDescriptor()
local ebs = nil;
if chk_bs:GetChecked() then ebs = dd_buttonSkin:GetSelection(); end
if chk_bs:GetChecked() then chk_bkd:SetChecked(); end
return {
feature = "custom_icons"; version = 1;
name = ed_name.editBox:GetText();
250,8 → 269,11
w = VFL.clamp(ed_width.editBox:GetNumber(), 1, 100);
h = VFL.clamp(ed_height.editBox:GetNumber(), 1, 100);
-- display
externalButtonSkin = ebs;
usebs = chk_bs:GetChecked();
externalButtonSkin = dd_buttonSkin:GetSelection();
ButtonSkinOffset = VFL.clamp(ed_bs.editBox:GetNumber(), 0, 50);
usebkd = chk_bkd:GetChecked();
bkd = dd_backdrop:GetSelectedBackdrop();
number = number.editBox:GetText();
drawLayer = drawLayer:GetSelection();
texture = tsel:GetSelectedTexture();
276,6 → 298,7
orientation = "RIGHT"; iconspx = 5; iconspy = 0;
externalButtonSkin = "bs_default";
ButtonSkinOffset = 0;
bkd = VFL.copy(VFLUI.defaultBackdrop);
drawLayer = "ARTWORK";
texture = VFL.copy(VFLUI.defaultTexture);
color1 = {r=1,g=1,b=1,a=1};
trunk/RDX/Designs/Lists/HeaderAuraIconList.lua
15,6 → 15,7
end;
ExposeFeature = function(desc, state, errs)
if not desc then VFL.AddError(errs, VFLI.i18n("Missing descriptor.")); return nil; end
if not desc.usebkd then desc.usebs = true; end
local flg = true;
flg = flg and RDXUI.UFFrameCheck_Proto("Icons_", desc, state, errs);
flg = flg and RDXUI.UFAnchorCheck(desc.anchor, state, errs);
24,12 → 25,17
end;
ApplyFeature = function(desc, state)
local objname = "Icons_" .. desc.name;
local ebsflag, ebs, ebsos = "false", "bs_default", 0;
if desc.externalButtonSkin then
ebsflag = "true";
ebs = desc.externalButtonSkin;
if desc.ButtonSkinOffset then ebsos = desc.ButtonSkinOffset; end
local usebs = "false"; if desc.usebs then usebs = "true"; end
local ebs = desc.externalButtonSkin or "bs_default";
local usebkd = "false"; if desc.usebkd then usebkd = "true"; end
local bkd = desc.bkd or VFLUI.defaultBackdrop;
local os = 0;
if desc.usebs then
os = desc.ButtonSkinOffset or 0;
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 showweapons = "false";
if desc.showweapons then showweapons = "true"; end
if not desc.xoffset then desc.xoffset = "0"; end
84,9 → 90,12
for _,child in self:ActiveChildren() do
if not child.btn then
local btn;
if ]] .. ebsflag .. [[ then
if ]] .. usebs .. [[ then
btn = VFLUI.SkinButton:new();
btn:SetButtonSkin("]] .. ebs ..[[", true, true, false, true, true, true, false, true, true, true);
elseif ]] .. usebkd .. [[ then
btn = VFLUI.AcquireFrame("Frame");
VFLUI.SetBackdrop(btn, ]] .. Serialize(bkd) .. [[);
else
btn = VFLUI.AcquireFrame("Frame");
end
94,8 → 103,8
btn:SetAllPoints(child);
 
btn.tex = VFLUI.CreateTexture(btn);
btn.tex:SetPoint("TOPLEFT", btn, "TOPLEFT", ]] .. ebsos .. [[, -]] .. ebsos .. [[);
btn.tex:SetPoint("BOTTOMRIGHT", btn, "BOTTOMRIGHT", -]] .. ebsos .. [[, ]] .. ebsos .. [[);
btn.tex:SetPoint("TOPLEFT", btn, "TOPLEFT", ]] .. os .. [[, -]] .. os .. [[);
btn.tex:SetPoint("BOTTOMRIGHT", btn, "BOTTOMRIGHT", -]] .. os .. [[, ]] .. os .. [[);
btn.tex:SetTexCoord(0.08, 1-0.08, 0.08, 1-0.08);
btn.tex:SetDrawLayer("ARTWORK", 2);
btn.tex:Show();
133,9 → 142,12
if tempEnchant1 then
if not tempEnchant1.btn then
local btn;
if ]] .. ebsflag .. [[ then
if ]] .. usebs .. [[ then
btn = VFLUI.SkinButton:new();
btn:SetButtonSkin("]] .. ebs ..[[", true, true, false, true, true, true, false, true, true, true);
elseif ]] .. usebkd .. [[ then
btn = VFLUI.AcquireFrame("Frame");
VFLUI.SetBackdrop(btn, ]] .. Serialize(bkd) .. [[);
else
btn = VFLUI.AcquireFrame("Frame");
end
143,8 → 155,8
btn:SetAllPoints(tempEnchant1);
 
btn.tex = VFLUI.CreateTexture(btn);
btn.tex:SetPoint("TOPLEFT", btn, "TOPLEFT", ]] .. ebsos .. [[, -]] .. ebsos .. [[);
btn.tex:SetPoint("BOTTOMRIGHT", btn, "BOTTOMRIGHT", -]] .. ebsos .. [[, ]] .. ebsos .. [[);
btn.tex:SetPoint("TOPLEFT", btn, "TOPLEFT", ]] .. os .. [[, -]] .. os .. [[);
btn.tex:SetPoint("BOTTOMRIGHT", btn, "BOTTOMRIGHT", -]] .. os .. [[, ]] .. os .. [[);
btn.tex:SetTexCoord(0.08, 1-0.08, 0.08, 1-0.08);
btn.tex:Show();
 
177,9 → 189,12
if tempEnchant2 then
if not tempEnchant2.btn then
local btn;
if ]] .. ebsflag .. [[ then
if ]] .. usebs .. [[ then
btn = VFLUI.SkinButton:new();
btn:SetButtonSkin("]] .. ebs ..[[", true, true, false, true, true, true, false, true, true, true);
elseif ]] .. usebkd .. [[ then
btn = VFLUI.AcquireFrame("Frame");
VFLUI.SetBackdrop(btn, ]] .. Serialize(bkd) .. [[);
else
btn = VFLUI.AcquireFrame("Frame");
end
187,8 → 202,8
btn:SetAllPoints(tempEnchant2);
 
btn.tex = VFLUI.CreateTexture(btn);
btn.tex:SetPoint("TOPLEFT", btn, "TOPLEFT", ]] .. ebsos .. [[, -]] .. ebsos .. [[);
btn.tex:SetPoint("BOTTOMRIGHT", btn, "BOTTOMRIGHT", -]] .. ebsos .. [[, ]] .. ebsos .. [[);
btn.tex:SetPoint("TOPLEFT", btn, "TOPLEFT", ]] .. os .. [[, -]] .. os .. [[);
btn.tex:SetPoint("BOTTOMRIGHT", btn, "BOTTOMRIGHT", -]] .. os .. [[, ]] .. os .. [[);
btn.tex:SetTexCoord(0.08, 1-0.08, 0.08, 1-0.08);
btn.tex:Show();
 
221,9 → 236,12
if tempEnchant3 then
if not tempEnchant3.btn then
local btn;
if ]] .. ebsflag .. [[ then
if ]] .. usebs .. [[ then
btn = VFLUI.SkinButton:new();
btn:SetButtonSkin("]] .. ebs ..[[", true, true, false, true, true, true, false, true, true, true);
elseif ]] .. usebkd .. [[ then
btn = VFLUI.AcquireFrame("Frame");
VFLUI.SetBackdrop(btn, ]] .. Serialize(bkd) .. [[);
else
btn = VFLUI.AcquireFrame("Frame");
end
231,8 → 249,8
btn:SetAllPoints(tempEnchant3);
 
btn.tex = VFLUI.CreateTexture(btn);
btn.tex:SetPoint("TOPLEFT", btn, "TOPLEFT", ]] .. ebsos .. [[, -]] .. ebsos .. [[);
btn.tex:SetPoint("BOTTOMRIGHT", btn, "BOTTOMRIGHT", -]] .. ebsos .. [[, ]] .. ebsos .. [[);
btn.tex:SetPoint("TOPLEFT", btn, "TOPLEFT", ]] .. os .. [[, -]] .. os .. [[);
btn.tex:SetPoint("BOTTOMRIGHT", btn, "BOTTOMRIGHT", -]] .. os .. [[, ]] .. os .. [[);
btn.tex:SetTexCoord(0.08, 1-0.08, 0.08, 1-0.08);
btn.tex:Show();
 
419,18 → 437,17
if desc and desc.yoffset then ed_yoffset.editBox:SetText(desc.yoffset); else ed_yoffset.editBox:SetText("0"); end
ui:InsertFrame(ed_yoffset);
 
-------------- ButtonSkin
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Button Skin")));
-------------- Display
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Display")));
 
local chk_bs = VFLUI.CheckEmbedRight(ui, VFLI.i18n("Use Button Skin"));
local dd_buttonSkin = VFLUI.Dropdown:new(chk_bs, VFLUI.GetButtonSkinList);
dd_buttonSkin:SetWidth(150); dd_buttonSkin:Show();
if desc and desc.externalButtonSkin then
dd_buttonSkin:SetSelection(desc.externalButtonSkin);
if desc and desc.usebs then
chk_bs:SetChecked(true);
dd_buttonSkin:SetSelection(desc.externalButtonSkin);
else
chk_bs:SetChecked();
dd_buttonSkin:SetSelection("bs_default");
end
chk_bs:EmbedChild(dd_buttonSkin); chk_bs:Show();
ui:InsertFrame(chk_bs);
440,6 → 457,17
if desc and desc.ButtonSkinOffset then ed_bs.editBox:SetText(desc.ButtonSkinOffset); end
ui:InsertFrame(ed_bs);
 
local chk_bkd = VFLUI.CheckEmbedRight(ui, VFLI.i18n("Use Backdrop"));
local dd_backdrop = VFLUI.MakeBackdropSelectButton(chk_bkd, desc.bkd);
dd_backdrop:Show();
if desc and desc.usebkd then
chk_bkd:SetChecked(true);
else
chk_bkd:SetChecked();
end
chk_bkd:EmbedChild(dd_backdrop); chk_bkd:Show();
ui:InsertFrame(chk_bkd);
 
-------------- CooldownDisplay
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Cooldown")));
local ercd = VFLUI.EmbedRight(ui, VFLI.i18n("Cooldown :"));
491,8 → 519,7
ui:InsertFrame(er);
 
function ui:GetDescriptor()
local ebs = nil;
if chk_bs:GetChecked() then ebs = dd_buttonSkin:GetSelection(); end
if chk_bs:GetChecked() then chk_bkd:SetChecked(); end
return {
feature = "sec_aura_icons"; version = 1;
name = ed_name.editBox:GetText();
509,9 → 536,11
xoffset = VFL.clamp(ed_xoffset.editBox:GetNumber(), -10, 10);
yoffset = VFL.clamp(ed_yoffset.editBox:GetNumber(), -10, 10);
-- display
externalButtonSkin = ebs;
usebs = chk_bs:GetChecked();
externalButtonSkin = dd_buttonSkin:GetSelection();
ButtonSkinOffset = VFL.clamp(ed_bs.editBox:GetNumber(), 0, 50);
bkd = nil;
usebkd = chk_bkd:GetChecked();
bkd = dd_backdrop:GetSelectedBackdrop();
-- cooldown
cd = cd:GetSelectedCooldown();
fontst = fontsel2:GetSelectedFont();
537,6 → 566,7
template = "RDXAB30x30Template"; orientation = "LEFT"; wrapafter = 10; maxwraps = 2; xoffset = 0; yoffset = 0; point = "TOPLEFT";
externalButtonSkin = "bs_default";
ButtonSkinOffset = 0;
bkd = VFL.copy(VFLUI.defaultBackdrop);
cd = VFL.copy(VFLUI.defaultCooldown);
fontst = font;
sortmethod = "INDEX";
trunk/RDX/Designs/Lists/CooldownIconList.lua
14,20 → 14,27
 
--------------- Code emitter helpers
local function _EmitCreateCode(objname, desc)
local ebsflag, ebs, ebsos = "false", "bs_default", 0;
if desc.externalButtonSkin then
ebsflag = "true";
ebs = desc.externalButtonSkin;
if desc.ButtonSkinOffset then ebsos = desc.ButtonSkinOffset; end
local usebs = "false"; if desc.usebs then usebs = "true"; end
local ebs = desc.externalButtonSkin or "bs_default";
local usebkd = "false"; if desc.usebkd then usebkd = "true"; end
local bkd = desc.bkd or VFLUI.defaultBackdrop;
local os = 0;
if desc.usebs then
os = desc.ButtonSkinOffset or 0;
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 createCode = [[
frame.]] .. objname .. [[ = {};
local btn, btnOwner = nil, ]] .. RDXUI.ResolveFrameReference(desc.owner) .. [[;
for i=1, ]] .. desc.nIcons .. [[ do
if ]] .. ebsflag .. [[ then
if ]] .. usebs .. [[ then
btn = VFLUI.SkinButton:new();
btn:SetButtonSkin("]] .. ebs ..[[", true, true, false, true, true, true, false, true, true, true);
elseif ]] .. usebkd .. [[ then
btn = VFLUI.AcquireFrame("Frame");
VFLUI.SetBackdrop(btn, ]] .. Serialize(bkd) .. [[);
else
btn = VFLUI.AcquireFrame("Frame");
end
43,8 → 50,8
end
createCode = createCode .. [[
btn.tex = VFLUI.CreateTexture(btn);
btn.tex:SetPoint("TOPLEFT", btn, "TOPLEFT", ]] .. ebsos .. [[, -]] .. ebsos .. [[);
btn.tex:SetPoint("BOTTOMRIGHT", btn, "BOTTOMRIGHT", -]] .. ebsos .. [[, ]] .. ebsos .. [[);
btn.tex:SetPoint("TOPLEFT", btn, "TOPLEFT", ]] .. os .. [[, -]] .. os .. [[);
btn.tex:SetPoint("BOTTOMRIGHT", btn, "BOTTOMRIGHT", -]] .. os .. [[, ]] .. os .. [[);
btn.tex:SetTexCoord(0.08, 1-0.08, 0.08, 1-0.08);
btn.tex:SetDrawLayer("ARTWORK", 2);
btn.tex:Show();
77,6 → 84,7
if not desc then VFL.AddError(errs, VFLI.i18n("Missing descriptor.")); return nil; end
if desc.owner == "Base" then desc.owner = "decor"; end
if not desc.cd then desc.cd = VFL.copy(VFLUI.defaultCooldown); end
if not desc.usebkd then desc.usebs = true; end
local flg = true;
flg = flg and RDXUI.UFFrameCheck_Proto("Icons_", desc, state, errs);
flg = flg and RDXUI.UFAnchorCheck(desc.anchor, state, errs);
97,12 → 105,17
end;
ApplyFeature = function(desc, state)
local objname = "Icons_" .. desc.name;
local ebsflag, ebs, ebsos = "false", "bs_default", 0;
if desc.externalButtonSkin then
ebsflag = "true";
ebs = desc.externalButtonSkin;
if desc.ButtonSkinOffset then ebsos = desc.ButtonSkinOffset; end
local usebs = "false"; if desc.usebs then usebs = "true"; end
local ebs = desc.externalButtonSkin or "bs_default";
local usebkd = "false"; if desc.usebkd then usebkd = "true"; end
local bkd = desc.bkd or VFLUI.defaultBackdrop;
local os = 0;
if desc.usebs then
os = desc.ButtonSkinOffset or 0;
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
 
-- Event hinting.
local mux, mask = state:GetContainingWindowState():GetSlotValue("Multiplexer"), 0;
mask = mux:GetPaintMask("COOLDOWN");
250,7 → 263,7
if (_j > ]] .. desc.nIcons .. [[) then break; end
tbl_icons = sort_icons[_j];
if not tbl_icons then break; end
__SetCooldownIcon(_icons[_j], tbl_icons._meta, tbl_icons._tex, tbl_icons._dur, tbl_icons._tl, tbl_icons._i, ]] .. ebs .. [[);
__SetCooldownIcon(_icons[_j], tbl_icons._meta, tbl_icons._tex, tbl_icons._dur, tbl_icons._tl, tbl_icons._i);
_j = _j + 1;
end
 
372,18 → 385,17
if desc and desc.size then ed_size.editBox:SetText(desc.size); end
ui:InsertFrame(ed_size);
 
-------------- ButtonSkin
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Button Skin")));
-------------- Display
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Display")));
 
local chk_bs = VFLUI.CheckEmbedRight(ui, VFLI.i18n("Use Button Skin"));
local dd_buttonSkin = VFLUI.Dropdown:new(chk_bs, VFLUI.GetButtonSkinList);
dd_buttonSkin:SetWidth(150); dd_buttonSkin:Show();
if desc and desc.externalButtonSkin then
dd_buttonSkin:SetSelection(desc.externalButtonSkin);
if desc and desc.usebs then
chk_bs:SetChecked(true);
dd_buttonSkin:SetSelection(desc.externalButtonSkin);
else
chk_bs:SetChecked();
dd_buttonSkin:SetSelection("bs_default");
end
chk_bs:EmbedChild(dd_buttonSkin); chk_bs:Show();
ui:InsertFrame(chk_bs);
393,6 → 405,17
if desc and desc.ButtonSkinOffset then ed_bs.editBox:SetText(desc.ButtonSkinOffset); end
ui:InsertFrame(ed_bs);
 
local chk_bkd = VFLUI.CheckEmbedRight(ui, VFLI.i18n("Use Backdrop"));
local dd_backdrop = VFLUI.MakeBackdropSelectButton(chk_bkd, desc.bkd);
dd_backdrop:Show();
if desc and desc.usebkd then
chk_bkd:SetChecked(true);
else
chk_bkd:SetChecked();
end
chk_bkd:EmbedChild(dd_backdrop); chk_bkd:Show();
ui:InsertFrame(chk_bkd);
 
-------------- CooldownDisplay
ui:InsertFrame(VFLUI.Separator:new(ui, VFLI.i18n("Cooldown")));
local ercd = VFLUI.EmbedRight(ui, VFLI.i18n("Cooldown :"));
486,8 → 509,7
 
function ui:GetDescriptor()
local filterName, filterNameList, filternl, ext, unitfi, maxdurfil, mindurfil = nil, nil, {}, nil, "", "", "";
local ebs = nil;
if chk_bs:GetChecked() then ebs = dd_buttonSkin:GetSelection(); end
if chk_bs:GetChecked() then chk_bkd:SetChecked(); end
if chk_timefilter:GetChecked() then
maxdurfil = ed_maxduration.editBox:GetText();
mindurfil = ed_minduration.editBox:GetText();
543,10 → 565,11
iconspy = VFL.clamp(ed_iconspy.editBox:GetNumber(), -200, 200);
size = VFL.clamp(ed_size.editBox:GetNumber(), 1, 100);
-- display
externalButtonSkin = ebs;
usebs = chk_bs:GetChecked();
externalButtonSkin = dd_buttonSkin:GetSelection();
ButtonSkinOffset = VFL.clamp(ed_bs.editBox:GetNumber(), 0, 50);
bkd = nil;
--bkd = bkd:GetSelectedBackdrop();
usebkd = chk_bkd:GetChecked();
bkd = dd_backdrop:GetSelectedBackdrop();
-- cooldown
cd = cd:GetSelectedCooldown();
-- other
591,6 → 614,7
cd = VFL.copy(VFLUI.defaultCooldown);
externalButtonSkin = "bs_default";
ButtonSkinOffset = 0;
bkd = VFL.copy(VFLUI.defaultBackdrop);
};
end;
});
trunk/RDX/PanelMgr/MainMenuBar.lua
910,6 → 910,12
end);
 
RDXPM.MainMenu:RegisterMenuFunction(function(ent)
ent.text = VFLI.i18n("Learn Wizard");
ent.func = function() RDX.NewLearnWizard(); end;
ent.notCheckable = true;
end);
 
RDXPM.MainMenu:RegisterMenuFunction(function(ent)
ent.text = VFLI.i18n("Debugging");
ent.hasArrow = true;
ent.notCheckable = true;
trunk/RDX/PanelMgr/GlobalSettings.lua
28,10 → 28,10
if opt and opt.asmp then chk_asmp:SetChecked(true); else chk_asmp:SetChecked(); end
ui:InsertFrame(chk_asmp);
 
local chk_hmp = VFLUI.Checkbox:new(ui); chk_hmp:Show();
chk_hmp:SetText(VFLI.i18n("Always Hide Main Panel"));
if opt and opt.hmp then chk_hmp:SetChecked(true); else chk_hmp:SetChecked(); end
ui:InsertFrame(chk_hmp);
--local chk_hmp = VFLUI.Checkbox:new(ui); chk_hmp:Show();
--chk_hmp:SetText(VFLI.i18n("Always Hide Main Panel"));
--if opt and opt.hmp then chk_hmp:SetChecked(true); else chk_hmp:SetChecked(); end
--ui:InsertFrame(chk_hmp);
 
 
local chk_upp = VFLUI.Checkbox:new(ui); chk_upp:Show();
69,7 → 69,7
 
local function Save()
opt.asmp = chk_asmp:GetChecked();
opt.hmp = chk_hmp:GetChecked();
--opt.hmp = chk_hmp:GetChecked();
opt.upp = chk_upp:GetChecked();
--opt.dgr = chk_dgr:GetChecked();
local mainPane = RDXPM.GetMainPane();
109,4 → 109,8
else
RDXPM.RDXManage(VFLDIALOG);
end
end
 
function RDXPM.IsRDXManageOpen()
if dlg then return true; else return nil; end
end
\ No newline at end of file
trunk/RDX/IdeEditor/FeatureEditor.lua
51,7 → 51,7
 
dlg = VFLUI.Window:new(parent);
VFLUI.Window.SetDefaultFraming(dlg, 24);
dlg:SetBackdrop(VFLUI.BlackDialogBackdrop);
--dlg:SetBackdrop(VFLUI.BlackDialogBackdrop);
dlg:SetTitleColor(0,.6,0);
dlg:SetText(VFLI.i18n("Feature Editor: ") .. path);
dlg:SetWidth(700); dlg:SetHeight(500);