Skip to Content

Radial Menu

A circular menu that appears on screen for quick action selection.

Exports

ExportParametersReturns
AddRadialItem(items)
RemoveRadialItem(item)
ClearRadialItems()
RegisterRadial(radial)
HideRadial()
DisableRadial(state)
GetCurrentRadialId()string or nil

Radial Item Fields

FieldTypeDescription
idstringUnique identifier
iconstringFontAwesome icon name or image URL
labelstringDisplay label shown when hovered
iconColorstringCustom icon color (hex or CSS color)
iconAnimationstringIcon animation: 'spin', 'beat', 'fade', 'bounce', 'shake', 'beatFade', 'spinPulse'
onSelectfunctionCallback when selected
menustringID 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) end
Last updated on