Skip to main content

Radial Menu

image

Radial Menu is a customizable WeaponWheel menu, it's divided in 8 segments (RadialSegment) that can be selected, and to each segment you can add any amount of SegmentItem items you want.

Constructor​

public RadialMenu()
public RadialMenu(PointF offset)
RadialMenu.New(x, y)

Parameters​

Visible​

Gets or Sets the menu visible status. If Visible is true the menu is drawn on screen.

public bool Visible {get;set;}
radMenu:Visible(bool)

CurrentSegment​

Gets or Sets the current highlighted segment

public int CurrentSegment {get;set;}
radMenu:CurrentSegment(index)

Segments​

A table in Lua and a List in C#, both using only RadialSegment tab and max 8 items. Each item can contain int32.max items to scroll like the original Weapon Wheel.

public RadialSegment[] Segments
radMenu.Segments -- An 8 items table, each item represents a segment of the wheel (clockwise)

Enable3D​

Gets or Sets the 3D effect on wheel, true by default.

public bool Enable3D {get;set;}
radMenu:Enable3D(enable) -- Enables / disables the 3D effects on the wheel (default true)

Instructional Buttons​

This menu like all other menus have InstructionalButtons table / List handled automatically by ScaleformUI. Here's the functions to handle the list.

List<InstructionalButton> InstructionalButtons // the instructional buttons to show while the menu is Visible
void AddInstructionalButton(InstructionalButton button) // adds an instructional button to the current menu
void RemoveInstructionalButton(InstructionalButton button) // removes the desired instructional button
void RemoveInstructionalButton(int index) // removes the desired instructional button
.InstructionalButtons -- the instructional buttons to show while the menu is Visible
:AddInstructionButton(button) -- adds an instructional button to the current menu
:RemoveInstructionButton(button) -- removes the desired instructional button

Events​

Triggered based on player's actions.

MenuOpenedEvent(RadialMenu menu, dynamic data = null);
MenuClosedEvent(RadialMenu menu);
SegmentChanged(RadialSegment segment);
IndexChanged(RadialSegment segment, int index);
SegmentSelected(RadialSegment segment);
OnMenuOpen = function(menu, data)
end,
OnMenuClose = function(menu)
end,
OnSegmentHighlight = function(segment)
end,
OnSegmentIndexChange = function(segment, index)
end,
OnSegmentSelect = function(segment)
end