Files
ox_lib/resource/interface/client/textui.lua

32 lines
668 B
Lua
Raw Normal View History

---@class TextUIOptions
---@field position? 'right-center' | 'left-center' | 'top-center';
---@field icon? string | {[1]: IconProp, [2]: string};
---@field iconColor? string;
---@field style? string | table;
local isOpen = false
---@param text string
---@param options? TextUIOptions
2022-04-11 15:59:18 +02:00
function lib.showTextUI(text, options)
if not options then options = {} end
options.text = text
SendNUIMessage({
action = 'textUi',
data = options
})
isOpen = true
2022-04-11 15:59:18 +02:00
end
function lib.hideTextUI()
SendNUIMessage({
action = 'textUiHide'
})
isOpen = false
end
---@return boolean
function lib.isTextUIOpen()
return isOpen
end