Introduced new client modules for helptext, notify, and progressbar using ZSX_UIV2. Updated client and shared configuration files to include ZSX_UIV2 as an option for ProgressBarSystem, Notify, and HelpText. Bumped fxmanifest version to 0.13.2.
27 lines
891 B
Lua
27 lines
891 B
Lua
---@diagnostic disable: duplicate-set-field
|
|
HelpText = HelpText or {}
|
|
local resourceName = "ZSX_UIV2"
|
|
local configValue = BridgeSharedConfig.HelpText
|
|
if (configValue == "auto" and GetResourceState(resourceName) ~= "started") or (configValue ~= "auto" and configValue ~= resourceName) then return end
|
|
|
|
---This will get the name of the in use resource.
|
|
---@return string
|
|
HelpText.GetResourceName = function()
|
|
return resourceName
|
|
end
|
|
|
|
---This will show a help text message at the screen position passed
|
|
---@param message string
|
|
---@param position string
|
|
---@return nil
|
|
HelpText.ShowHelpText = function(message, position)
|
|
return exports['ZSX_UIV2']:TextUI_Persistent(nil, message, nil, nil, nil)
|
|
end
|
|
|
|
---This will hide the help text message on the screen
|
|
---@return nil
|
|
HelpText.HideHelpText = function()
|
|
return exports['ZSX_UIV2']:TextUI_RemovePersistent(false)
|
|
end
|
|
|
|
return HelpText |