Class RadialMenu
Radial menu control that arranges child controls (of type Image) in a circle.
Implements
Namespace: FlaxEngine.GUI
Assembly: FlaxEngine.CSharp.dll
Syntax
public class RadialMenu : ContainerControl, IComparable, IDrawable
Constructors
RadialMenu()
RadialMenu(Float2, Float2)
Initializes a new instance of the RadialMenu class.
Declaration
public RadialMenu(Float2 location, Float2 size)
Parameters
|
Float2
location
Position |
|
Float2
size
Size |
RadialMenu(Single, Single, Single, Single)
Initializes a new instance of the RadialMenu class.
Declaration
public RadialMenu(float x, float y, float width = 100F, float height = 100F)
Parameters
|
System.Single
x
Position X coordinate |
|
System.Single
y
Position Y coordinate |
|
System.Single
width
Width |
|
System.Single
height
Height |
Fields
AllowChangeSelectionWhenInside
Allows the selected to change when the mouse is moved in the empty center of the menu.
Declaration
[VisibleIf("ShowMatProp", false)]
public bool AllowChangeSelectionWhenInside
Field Value
|
System.Boolean
|
AllowChangeSelectionWhenOutside
Allows the selected to change when the mouse is moved outside of the menu.
Declaration
[VisibleIf("ShowMatProp", false)]
public bool AllowChangeSelectionWhenOutside
Field Value
|
System.Boolean
|
CenterAsButton
Wether the center is a button.
Declaration
[VisibleIf("ShowMatProp", false)]
public bool CenterAsButton
Field Value
|
System.Boolean
|
Properties
BackgroundColor
Gets or sets control background color (transparent color means no background rendering).
Declaration
[VisibleIf("ShowMatProp", false)]
public Color BackgroundColor { get; set; }
Property Value
|
Color
|
EdgeOffset
Gets or sets the offset of the outer edge from the bounds of the Control.
Declaration
[EditorOrder(2)]
[Range(0F, 1F)]
public float EdgeOffset { get; set; }
Property Value
|
System.Single
|
ForegroundColor
Gets or sets the color of the foreground.
Declaration
[VisibleIf("ShowMatProp", false)]
public Color ForegroundColor { get; set; }
Property Value
|
Color
|
HighlightColor
Gets or sets the color of the outer edge highlight.
Declaration
[VisibleIf("ShowMatProp", false)]
public Color HighlightColor { get; set; }
Property Value
|
Color
|
Material
The material used for menu background drawing.
Declaration
[EditorOrder(1)]
public MaterialBase Material { get; set; }
Property Value
|
MaterialBase
|
SelectionColor
Gets or sets the color of the selection.
Declaration
[VisibleIf("ShowMatProp", false)]
public Color SelectionColor { get; set; }
Property Value
|
Color
|
Thickness
Gets or sets the thickness of the menu.
Declaration
[EditorOrder(3)]
[Range(0F, 1F)]
[VisibleIf("ShowMatProp", false)]
public float Thickness { get; set; }
Property Value
|
System.Single
|
Methods
DrawSelf()
Draws the control.
Declaration
public override void DrawSelf()
Overrides
OnChildrenChanged()
Called when children collection gets changed (child added or removed).
Declaration
public override void OnChildrenChanged()
Overrides
OnMouseDown(Float2, MouseButton)
When mouse goes down over control's area
Declaration
public override bool OnMouseDown(Float2 location, MouseButton button)
Parameters
|
Float2
location
Mouse location in Control Space |
|
MouseButton
button
Mouse buttons state (flags) |
Returns
|
System.Boolean
True if event has been handled, otherwise false |
Overrides
OnMouseLeave()
When mouse leaves control's area
Declaration
public override void OnMouseLeave()
Overrides
OnMouseMove(Float2)
When mouse moves over control's area
Declaration
public override void OnMouseMove(Float2 location)
Parameters
|
Float2
location
Mouse location in Control Space |
Overrides
OnMouseUp(Float2, MouseButton)
When mouse goes up over control's area
Declaration
public override bool OnMouseUp(Float2 location, MouseButton button)
Parameters
|
Float2
location
Mouse location in Control Space |
|
MouseButton
button
Mouse buttons state (flags) |
Returns
|
System.Boolean
True if event has been handled, otherwise false |
Overrides
PerformLayout(Boolean)
Update control layout
Declaration
public override void PerformLayout(bool force = false)
Parameters
|
System.Boolean
force
True if perform layout by force even if cached state wants to skip it due to optimization. |
Overrides
UpdateAngle(ref Float2)
Updates the current angle and selected segment of the radial menu based on the specified location inside of the control.
Declaration
public void UpdateAngle(ref Float2 location)
Parameters
|
Float2
location
The position used to determine the angle and segment selection within the radial menu. |