Menu
Last updated
Last updated
exports['jale_interface']:RegisterMenu(options)
exports['jale_interface']:ShowMenu(id)
exports['jale_interface']:HideMenu(id)
options = {
id = 'testid', -- id of menu for show and hide
title = 'Test Menu', -- title of menu
blurBg = true, -- blur ingame background
text = { -- you can add as many texts as you want
"Test text.",
},
menu = { -- you can add as many as you want to the selection menu
{ label = 'Test', args = { price = 5, test = 'test' } },
},
inputs = { -- inputs in which you can type what you want, you can add as many as you want
{ placeholder = 'Placeholder text', type = 'text' --[[ text or number ]], defaultvalue = '' },
},
buttons = { -- button titles
submit = 'SUBMIT',
cancel = 'CANCEL',
},
onClose = function () -- function when player close menu
print('closed')
end,
onSubmit = function (args, input) -- function when player click submit button
print('submited', args.test, input[1])
end,
onCancel = function () -- function when player click cancel button
print('canceled')
end
}