Skip to content

Radial Menu ​

Documentation relating to the jo_radial script.

1. Installation ​

The jo_radial script works on all frameworks.

To install jo_radial:

  • Download the library: jo_libs
  • Unzip the folder and drop it in your resources folder.
  • Download jo_radial from your account.
  • Unzip the folder and drop it in your resources folder.
  • Add these ensures in your server.cfg:
    • ensure jo_libs
    • ensure jo_radial

Congratulations, the Radial Menu script is ready to be used! πŸ₯³

2. Usage ​

Using the radial menu is straightforward. Simply press the configured key (default is F7, find all the usable controls here) to open the wheel. From there, you can navigate through the different options with your mouse.

  • Open/Close: Press the configured Config.openKey.
  • Navigate: Move your mouse over an item to select it.
  • Select: Click on an item to trigger its action or open a submenu.
  • Submenus: Selecting an item with a submenu of type submenu will open a new set of options.
  • Back/Close: Use the central button to go back to the previous menu or close the wheel entirely. You can also use ESC or BACKSPACE to close it.

3. Configuration ​

The main configuration is done in jo_radial/shared/config.lua. This file allows you to define the menu's appearance, behavior, and content.

General Configuration ​

You can modify the menu open/close behavior by changing properties of the Config table.

ParameterTypeDescription
Config.openKeystringKey to open the menu (default is F7, find all the usable controls here)
Config.holdToOpenbooleanHold key to open menu (true) or toggle on/off ( false, default)

You can customize the overall look and feel of the radial menu using the Config.radialConfig table.

ParameterTypeDescription
colorstringMain color for highlights and hover effects (hex color code)
backTextstringText for the back button in submenus
closeTextstringText for the close button on the main menu
centerOpacityfloatOpacity of the center background
logostring (optional)Your server's logo. Supports URL (https://...), local file (logo.png from jo_radial/nui/img/), or other script NUI (nui://...). Set to nil to disable.

Example :

lua
Config.radialConfig = {
    color = "#07a3db",
    backText = "Back",
    closeText = "Close",
    centerOpacity = 0.6, 
    logo = "https://jumpon-studios.com/images/logo_no_bg.png"
}

This is where you define the structure and actions of your radial menu. It's an array of tables, where each table represents an item on the wheel.

Item Structure ​

Here is the structure for a single menu item:

ParameterTypeDescription
labelstringThe text displayed on the menu item. Use β–Ό to indicate a submenu.
iconstring (optional)The icon to display. Supports three formats:
- Local file: weapons.png (from jo_radial/nui/img/)
- Web URL: https://example.com/icon.png
- Other script NUI: nui://script_name/icon.png
hideLabelboolean (optional)Show the label within each wheel slice. Defaults to false.
disabledboolean | function (optional)If true, the item is visible but cannot be clicked. A function returning a boolean can be used for dynamic conditions.
visibleboolean | function (optional)If false, the item will not be shown. A function can be used for dynamic visibility.
shouldCloseboolean (optional)If true, the menu closes after the action. Defaults to true for actions and false for submenus.
onClicktable (optional)A table defining the action to take when the item is clicked. See details below.
submenutable (optional)A table defining a submenu. See details below.

onClick Object ​

ParameterTypeDescription
typestringThe type of action. Valid options are:
- clientEvent: Triggers a client-side event.
- serverEvent: Triggers a server-side event.
- command: Executes a client command.
- function: Executes a Lua function.
valuestring | functionThe event name, command string, or function to be executed.
argstable (optional)An array of arguments to pass to a clientEvent or serverEvent.

ParameterTypeDescription
typestringThe type of submenu to display. Valid options are:
- submenu: Navigates to a new, separate wheel.
itemstableAn array of item tables that make up the content of the submenu.

Configuration Examples ​

WARNING

The preset configuration that comes with the script is provided 'as is'. It is up to you to customize it to fit your server's specific needs and own particularities.

See examples below.

Last updated: