WoWInterface SVN OpenRDX

Compare Revisions

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

Rev 675 → Rev 676

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.
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;
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;
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
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()
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