/
-- None FRAMING |
----------------------------------------------------- |
function VFLUI.Framing.None(self, titleHeight) |
function VFLUI.Framing.None(self, titleHeight, bkd) |
-------------------------- WINDOW DECOR |
self.bkd = bkd; |
local perf, perfText; |
if VFLP.IsEnabled() then |
perf = VFLUI.AcquireFrame("Frame"); |
---------------------------- FIXED ELEMENT LAYOUT |
if self.SetInsets then |
self:SetInsets(0, 0, 0, 0); |
if self.bkd and self.bkd.insets then |
self:SetInsets(self.bkd.insets.left or 0, self.bkd.insets.top or 0, self.bkd.insets.right or 0, self.bkd.insets.bottom or 0); |
else |
self:SetInsets(0, 0, 0, 0); |
end |
else |
local clientArea = self:GetClientArea(); |
clientArea:ClearAllPoints(); |
self:SetWidth(dx); self:SetHeight(dy); |
end |
end |
if self.bkd then self:SetBackdrop(self.bkd); end |
----------------------------- LAYOUT OPERATORS |
function self:_FrameLayout() end |
perf:SetWidth(tw); |
end |
end |
if not self.SetInsets then |
if self.SetInsets then |
if self.bkd and self.bkd.insets then |
self:SetInsets(self.bkd.insets.left or 0, self.bkd.insets.top or 0, self.bkd.insets.right or 0, self.bkd.insets.bottom or 0); |
else |
self:SetInsets(0, 0, 0, 0); |
end |
else |
local ca = self:GetClientArea(); |
ca:SetWidth(self:GetWidth()); ca:SetHeight(self:GetHeight()); |
end |
if self.bkd then self:SetBackdrop(self.bkd); end |
end |
function self:_FrameDestroy() |
perf:ClearAllPoints(); |
perf:Destroy(); perf = nil; |
end |
if self.bkd then self:SetBackdrop(nil); end |
self.bkd = nil; |
end |
self:_FrameLayout(); |
----------------------------------------------------- |
function VFLUI.Framing.Default(self, titleHeight, bkd) |
-------------------------- WINDOW DECOR |
self:SetBackdrop(bkd or VFLUI.BlackDialogBackdrop); |
self.bkd = bkd or VFLUI.BlackDialogBackdrop; |
--self:SetBackdrop(bkd or VFLUI.BlackDialogBackdrop); |
local titleBar = self:GetTitleBar(); |
titleBar:SetPoint("TOPLEFT", self, "TOPLEFT", 5, -5); |
self:SetWidth(dx + 10); self:SetHeight(dy + titleHeight + 7); |
end |
end |
if self.bkd then self:SetBackdrop(self.bkd); end |
----------------------------- LAYOUT OPERATORS |
function self:_FrameLayout() |
local ca = self:GetClientArea(); |
ca:SetWidth(tw - 10); ca:SetHeight(self:GetHeight() - titleHeight - 7); |
end |
self:SetBackdrop(bkd or VFLUI.BlackDialogBackdrop); |
if self.bkd then self:SetBackdrop(self.bkd); end |
end |
function self:_FrameDestroy() |
perf:ClearAllPoints(); |
perf:Destroy(); perf = nil; |
end |
self:SetBackdrop(nil); |
if self.bkd then self:SetBackdrop(nil); end |
self.bkd = nil; |
VFLUI.ReleaseRegion(titleText); titleText = nil; |
VFLUI.ReleaseRegion(tx1); tx1 = nil; |
VFLUI.ReleaseRegion(tx2); tx2 = nil; |
insets = { left = 0, right = 0, top = 0, bottom = 0 } |
}; |
function VFLUI.Framing.Sleek(self) |
function VFLUI.Framing.Sleek(self, bkd) |
------------------------------------ WINDOW DECOR |
self:SetBackdrop(plainBackdrop); |
self.bkd = bkd or plainBackdrop; |
local decor = VFLUI.AcquireFrame("Frame"); |
decor:SetParent(self); |
---------------------------- FIXED ELEMENT LAYOUT |
if self.SetInsets then |
self:SetInsets(1, 14, 1, 1); |
if self.bkd and self.bkd.insets then |
self:SetInsets(self.bkd.insets.left or 1, (self.bkd.insets.top or 1) + 13, self.bkd.insets.right or 1, self.bkd.insets.bottom or 1); |
else |
self:SetInsets(1, 14, 1, 1); |
end |
else |
local clientArea = self:GetClientArea(); |
clientArea:ClearAllPoints(); |
self:SetWidth(dx + 2); self:SetHeight(dy + 15); |
end |
end |
if self.bkd then self:SetBackdrop(self.bkd); end |
----------------------------- LAYOUT OPERATORS |
function self:_FrameLayout() |
local ca = self:GetClientArea(); |
ca:SetWidth(tw - 2); ca:SetHeight(self:GetHeight() - 15); |
end |
--self:SetBackdrop(plainBackdrop); |
if self.bkd then self:SetBackdrop(self.bkd); end |
end |
function self:_FrameDestroy() |
local win = nil; |
state:_Attach(state:Slot("Create"), true, function(w) |
win = w; |
w:SetFraming(VFLUI.Framing.None, 0); |
w:SetFraming(VFLUI.Framing.None, 0, desc.bkd); |
end); |
return true; |
end, |
UIFromDescriptor = VFL.Nil, |
UIFromDescriptor = function(desc, parent, state) |
local ui = VFLUI.CompoundFrame:new(parent); |
local er = VFLUI.EmbedRight(ui, VFLI.i18n("Backdrop style")); |
local bkd = VFLUI.MakeBackdropSelectButton(er, desc.bkd); bkd:Show(); |
er:EmbedChild(bkd); er:Show(); |
ui:InsertFrame(er); |
function ui:GetDescriptor() |
return { |
feature = "Frame: None"; |
bkd = bkd:GetSelectedBackdrop(); |
}; |
end |
return ui; |
end, |
CreateDescriptor = function() return {feature = "Frame: None"}; end |
}); |
function RDXDK.WindowList(parent) |
if dlg then return nil; end |
dlg = VFLUI.Window:new(parent); |
dlg:SetFraming(VFLUI.Framing.Sleek); |
dlg:SetBackdropColor(0,0,0,.8); |
dlg:SetFraming(VFLUI.Framing.Sleek, VFLUI.DarkDialogBackdrop); |
--dlg:SetBackdropColor(0,0,0,.8); |
dlg:SetTitleColor(0,.5,0); |
dlg:SetText(VFLI.i18n("Window List")); |
dlg:SetPoint("CENTER", VFLParent, "CENTER"); |