mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 15:06:02 +01:00
feat(client/textui): open state getter for textUI (#126)
* feat(package/interface/textui): text ui open getter * feat(resource/interface/textui): text ui open getter
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
---@field iconColor? string;
|
||||
---@field style? string;
|
||||
|
||||
local isOpen = false
|
||||
|
||||
---@param text string
|
||||
---@param options TextUIOptions
|
||||
function lib.showTextUI(text, options)
|
||||
@@ -13,10 +15,17 @@ function lib.showTextUI(text, options)
|
||||
action = 'textUi',
|
||||
data = options
|
||||
})
|
||||
isOpen = true
|
||||
end
|
||||
|
||||
function lib.hideTextUI()
|
||||
SendNUIMessage({
|
||||
action = 'textUiHide'
|
||||
})
|
||||
end
|
||||
isOpen = false
|
||||
end
|
||||
|
||||
---@return boolean
|
||||
function lib.isTextUIOpen()
|
||||
return isOpen
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user