Frames can now be configured to always be drawn on top of other objects

This commit is contained in:
Kenny Shields 2014-02-26 07:34:04 -05:00
parent 271b9966c1
commit 55869912e4

View File

@ -50,6 +50,7 @@ function newobject:initialize()
self.dockable = false
self.resizing = false
self.canresize = false
self.alwaysontop = false
self.internals = {}
self.children = {}
self.icon = nil
@ -355,6 +356,10 @@ function newobject:update(dt)
end
end
if parent == base and self.alwaysontop and not self:IsTopChild() then
self:MakeTop()
end
if modal then
local tip = false
local key = 0
@ -1066,3 +1071,26 @@ function newobject:GetMaxHeight()
return self.maxheight
end
--[[---------------------------------------------------------
- func: SetAlwaysOnTop(bool)
- desc: sets whether or not a frame should always be
drawn on top of other objects
--]]---------------------------------------------------------
function newobject:SetAlwaysOnTop(bool)
self.alwaysontop = bool
return self
end
--[[---------------------------------------------------------
- func: GetAlwaysOnTop()
- desc: gets whether or not a frame should always be
drawn on top of other objects
--]]---------------------------------------------------------
function newobject:GetAlwaysOnTop()
return self.alwaysontop
end