Skip to main content

Menus

RadialMenuUI offers advanced structural features that elevate radial menus beyond simple 8-button wheels: slot layouts, nested submenus, and keeping the wheel open after a confirm.


1. Slot Coordinates

Slots are ordered clockwise, starting with 0 at the top (12 o'clock):

Radial Wheel 8-Sectors Layout

  • Any omitted slot remains empty.
  • Leaving the bottom slot (e.g. slot 4 on an 8-slot wheel) empty is a recommended GTA UX design pattern: it gives players an intuitive target to cancel without selecting anything.
var menu = new RadialMenuDef("actions", 8);
menu.AddEntry(new RadialEntryDef("top_action", 0) { Label = "Top Action" });
menu.AddEntry(new RadialEntryDef("right_action", 2) { Label = "Right Action" });
// Slots 1, 3, 4, 5, 6, 7 remain empty

2. Nested Submenus

You can attach a child menu to any entry via .WithSubmenu():

// 1. Create the parent menu
var mainMenu = new RadialMenuDef("main", 4);

// 2. Create the child submenu (can have a different slot count!)
var teleportSubmenu = new RadialMenuDef("tp_menu", 4);
teleportSubmenu.AddEntry(new RadialEntryDef("tp_airport", 0) { Label = "LS Airport" });
teleportSubmenu.AddEntry(new RadialEntryDef("tp_pier", 1) { Label = "Del Perro Pier" });
teleportSubmenu.AddEntry(new RadialEntryDef("tp_chiliad", 2) { Label = "Mount Chiliad" });

// 3. Attach submenu to slot 0 of main menu
var tpEntry = new RadialEntryDef("teleport", 0) { Label = "Teleport..." };
tpEntry.WithSubmenu(teleportSubmenu);
mainMenu.AddEntry(tpEntry);
  • Enter Submenu: Hover the parent slot and press Square / X (or click).
  • Return to Parent: Press L2 / LT (or right-click) to return to the previous level. At the root level, the wheel closes instead.

3. Keeping Wheel Open After Confirm

For actions that require repeated triggering (e.g. volume control, rapid item usage), use .KeepOpenAfterConfirm():

var entry = new RadialEntryDef("volume_up", 2) { Label = "Volume +" };
entry.KeepOpenAfterConfirm();
entry.OnConfirmed(result => AudioSystem.IncreaseVolume());
menu.AddEntry(entry);

For one slot that cycles through several choices without opening a submenu, see Variants.