From 13281e60530d2fc558cf77508ad3920ea0452a12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=20Gerg=C5=91?= <69343477+Rav3n95@users.noreply.github.com> Date: Thu, 15 Dec 2022 13:44:25 +0100 Subject: [PATCH] fix text ui again --- [esx]/esx_textui/TextUI.lua | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/[esx]/esx_textui/TextUI.lua b/[esx]/esx_textui/TextUI.lua index f63fcfcc..b70709f9 100644 --- a/[esx]/esx_textui/TextUI.lua +++ b/[esx]/esx_textui/TextUI.lua @@ -1,21 +1,19 @@ Debug = ESX.GetConfig().EnableDebug -local IsShowing = false +local isShowing = false ---@param message string ----@param Type string -local function TextUI(message, type) - IsShowing = true +---@param typ string +local function TextUI(message, typ) + isShowing = true SendNUIMessage({ action = 'show', message = message and message or 'ESX-TextUI', - type = type == 0 and "info" or type + type = type(typ) == "string" and typ or 'info' }) end local function HideUI() - if not IsShowing then - return - end - IsShowing = false + if not isShowing then return end + isShowing = false SendNUIMessage({ action = 'hide' })