mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-18 16:04:22 +00:00
Frames can now be configured to always be drawn on top of other objects
This commit is contained in:
parent
271b9966c1
commit
55869912e4
@ -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
|
Loading…
Reference in New Issue
Block a user