Arrow Menu
`registerArrowMenu(data, cb)`
Registers an arrow menu. cb is the default select callback: fn(selectedIndex, scrollIndex, args).
| Field | Type | Default | Description |
|---|---|---|---|
id |
string |
— | Unique menu identifier |
title |
string |
— | Menu header text |
position |
string |
'top-left' |
'top-left', 'top-right', 'bottom-left', 'bottom-right' |
canClose |
boolean |
true |
Whether the player can close with Backspace/Escape |
disableInput |
boolean |
false |
Disables all other game input while open |
onClose |
function |
— | Called when the menu closes: fn(keyPressed) |
onSelected |
function |
— | Called when selection changes: fn(index, secondaryValue, args) |
onSideScroll |
function |
— | Called when a scroll option changes: fn(index, scrollIndex, args) |
onCheck |
function |
— | Called when a checkbox is toggled: fn(index, checked, args) |
options |
table |
— | Array of option tables (see below) |
Option fields:
| Field | Type | Description |
|---|---|---|
label |
string |
Option label |
description |
string |
Shown in the bottom panel when selected |
icon |
string |
Font Awesome icon name or full class |
disabled |
boolean |
Greys out and skips the option |
close |
boolean |
Whether selecting this closes the menu (default true) |
args |
table |
Passed to callbacks on select |
checked |
boolean |
Makes the option a checkbox (pass initial state) |
values |
table |
Array of string or { label, description } — makes it a scroll option |
defaultIndex |
number |
Starting scroll index (1-based) |
exports['amzn_uikit']:registerArrowMenu({
id = 'police_menu',
title = 'Police Actions',
options = {
{ label = 'Cuff Player', icon = 'handcuffs' },
{ label = 'Search Player', icon = 'magnifying-glass' },
},
}, function(index, _, args)
-- handle selection
end)`showArrowMenu(id, startIndex)`
Opens a registered arrow menu. startIndex is optional (1-based).
`hideArrowMenu(onExit)`
Closes the active arrow menu. Pass true to trigger the onClose callback.
`getOpenArrowMenu()` → `string|nil`
Returns the ID of the currently open arrow menu, or nil.
`setArrowMenuOptions(id, options, index)`
Updates options for a registered menu. If index is provided (1-based), only that option is replaced, otherwise all options are replaced. Updates the UI immediately if the menu is open.
Previews
GLASS
