Add support for built in nui menu

This commit is contained in:
Jim Shield
2025-04-20 19:17:40 +01:00
parent 842379e8f9
commit 738e11c8e3
7 changed files with 594 additions and 77 deletions

View File

@@ -3,7 +3,7 @@
---------------------
This module provides a unified function to open menus using the configured menu system.
Supported systems include:
• jim-nui (kinda)
• jim_bridge (built-in nui menu that works on any framework)
• ox (or ox_context)
• qb (using QBMenuExport)
• gta (using WarMenu)

View File

@@ -63,15 +63,6 @@ function drawText(image, input, style, oxStyleTable)
end
ESX.TextUI(text, nil)
elseif Config.System.drawText == "jim" then
for k, v in pairs(input) do
input[k] = v.."<br>"
end
exports["jim-nui"]:drawText({
icon = nil,
text = text,
})
elseif Config.System.drawText == "red" then
-- Concatenate input lines and apply GTA style formatting.
for i = 1, #input do

View File

@@ -70,13 +70,6 @@ function triggerNotify(title, message, type, src)
TriggerClientEvent(getScript()..":DisplayESXNotify", src, type, message)
end
elseif Config.System.Notify == "jim" then
if not src then
exports["jim-nui"]:Notify(type, message)
else
TriggerClientEvent("jim-nui:client:notify'", src, type, message)
end
elseif Config.System.Notify == "red" then
if isStarted("jim-redui") then
if not src then