Move SuspendDrawing method up

This commit is contained in:
David Vogel 2022-07-28 10:07:47 +02:00
parent 38f83d19c9
commit 1eb6c10286

View File

@ -30,6 +30,12 @@ function UI:_ResetID()
self.CurrentID = nil
end
---Stops the UI from drawing for the next few frames.
---@param frames integer
function UI:SuspendDrawing(frames)
self.suspendFrames = math.max(self.suspendFrames or 0, frames)
end
function UI:_DrawToolbar()
local gui = self.gui
GuiZSet(gui, 0)
@ -115,12 +121,6 @@ function UI:_DrawMessages(messages)
end
end
---Stops the UI from drawing for the next few frames.
---@param frames integer
function UI:SuspendDrawing(frames)
self.suspendFrames = math.max(self.suspendFrames or 0, frames)
end
function UI:Draw()
self.gui = self.gui or GuiCreate()
local gui = self.gui