Class MainMenu
Menu strip with child buttons.
Implements
System.IComparable
Namespace: FlaxEditor.GUI
Assembly: FlaxEngine.CSharp.dll
Syntax
public sealed class MainMenu : ContainerControl, IComparable, IDrawable
Constructors
MainMenu(RootControl)
Initializes a new instance of the MainMenu class.
Declaration
public MainMenu(RootControl mainWindow)
Parameters
RootControl
mainWindow
The main window. |
Properties
Selected
Gets or sets the selected button (with opened context menu).
Declaration
public MainMenuButton Selected { get; set; }
Property Value
FlaxEditor.GUI.MainMenuButton
|
Methods
AddButton(String)
Adds the button.
Declaration
public MainMenuButton AddButton(string text)
Parameters
System.String
text
The button text. |
Returns
FlaxEditor.GUI.MainMenuButton
Created button control. |
GetButton(String)
Gets the button.
Declaration
public MainMenuButton GetButton(string text)
Parameters
System.String
text
The button text. |
Returns
FlaxEditor.GUI.MainMenuButton
The button or null if missing. |
OnDestroy()
Method called when managed instance should be destroyed
Declaration
public override void OnDestroy()
Overrides
OnKeyDown(KeyboardKeys)
When key goes down
Declaration
public override bool OnKeyDown(KeyboardKeys key)
Parameters
KeyboardKeys
key
Key value |
Returns
System.Boolean
True if event has been handled, otherwise false |
Overrides
OnMouseDoubleClick(Float2, MouseButton)
When mouse double clicks over control's area
Declaration
public override bool OnMouseDoubleClick(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
PerformLayoutAfterChildren()
Perform layout for that container control after performing it for child controls.
Declaration
protected override void PerformLayoutAfterChildren()
Overrides
Update(Single)
Perform control update and all its children
Declaration
public override void Update(float deltaTime)
Parameters
System.Single
deltaTime
Delta time in seconds |