Radial Menu
A circular menu that appears on screen for quick action selection.
Exports
| Export | Parameters | Returns |
|---|---|---|
AddRadialItem | (items) | — |
RemoveRadialItem | (item) | — |
ClearRadialItems | () | — |
RegisterRadial | (radial) | — |
HideRadial | () | — |
DisableRadial | (state) | — |
GetCurrentRadialId | () | string or nil |
Radial Item Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier |
icon | string | FontAwesome icon name or image URL |
label | string | Display label shown when hovered |
iconColor | string | Custom icon color (hex or CSS color) |
iconAnimation | string | Icon animation: 'spin', 'beat', 'fade', 'bounce', 'shake', 'beatFade', 'spinPulse' |
onSelect | function | Callback when selected |
menu | string | ID of a sub-radial menu to open |
Usage
Add Radial Items
exports['flux-ui-pack']:AddRadialItem({
{
id = 'garage',
icon = 'warehouse',
label = 'Garage',
iconColor = '#3498db',
iconAnimation = 'bounce',
onSelect = function()
print('Garage selected')
end
},
{
id = 'inventory',
icon = 'backpack',
label = 'Inventory',
onSelect = function()
print('Inventory selected')
end
}
})Remove a Radial Item
exports['flux-ui-pack']:RemoveRadialItem('garage')Clear All Items
exports['flux-ui-pack']:ClearRadialItems()Register a Sub-Radial
exports['flux-ui-pack']:RegisterRadial({
id = 'vehicle_menu',
items = {
{
id = 'engine',
icon = 'power-off',
label = 'Toggle Engine',
iconColor = '#e74c3c',
onSelect = function()
print('Engine toggled')
end
},
{
id = 'doors',
icon = 'door-open',
label = 'Toggle Doors',
onSelect = function()
print('Doors toggled')
end
}
}
})Hide Radial Menu
exports['flux-ui-pack']:HideRadial()Disable/Enable Radial Menu
-- Disable
exports['flux-ui-pack']:DisableRadial(true)
-- Re-enable
exports['flux-ui-pack']:DisableRadial(false)Get Current Radial ID
local currentId = exports['flux-ui-pack']:GetCurrentRadialId()
if currentId then
print('Current radial: ' .. currentId)
endLast updated on