From 1eb6c10286a684db16311e96470ed74cf6fda41b Mon Sep 17 00:00:00 2001 From: David Vogel Date: Thu, 28 Jul 2022 10:07:47 +0200 Subject: [PATCH] Move SuspendDrawing method up --- files/ui.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/files/ui.lua b/files/ui.lua index 5c57d6e..2776633 100644 --- a/files/ui.lua +++ b/files/ui.lua @@ -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