diff --git a/objects/frame.lua b/objects/frame.lua index f9ff90e..3e5799d 100644 --- a/objects/frame.lua +++ b/objects/frame.lua @@ -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 @@ -1065,4 +1070,27 @@ 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 \ No newline at end of file