public class Editor.Menu : Editor.Widget
Related Guides
Broader workflow and conceptual references connected to this API.
This event interface allows you to listen to Scene startup events. These events are run in three places:
When displaying text such as Hello World, you should instead use a localization token like #menu.helloworld. This will automatically replace the text with the corresponding language set by the user when set on a Label, allowing you to easily support multiple languages.
We try to keep as close to standard web styles as possible - but not every property is implemented. We'll use this page to highlight any differences.
Constructors
Showing 2 constructors
No results match this filter.
Methods
Showing 30 methods
public Editor.Label AddHeading(string title)
public virtual Editor.Option AddOptionWithImage(string name, Editor.Pixmap icon, System.Action action = null, string shortcut = null)
Parameters
action: Default: nullshortcut: Default: null
public Editor.Option AddSeparator()
public T AddWidget(T widget)
Add a widget as an action to the menu. Some widgets such as `Editor.Widget` and `Editor.LineEdit` require `Editor.Widget.OnMouseReleased(Editor.MouseEvent)` to set `Editor.MouseEvent.Accepted` to to prevent the menu from closing.
public void Clear()
public Editor.Menu FindOrCreateMenu(string name)
public Editor.Option GetOption(string name)
protected virtual void OnAboutToHide()
protected virtual void OnAboutToShow()
public void OpenAt(Vector2 position, bool modal = True)
Parameters
modal: Default: True
public void OpenAtCursor(bool modal = False)
Open this menu at the mouse cursor position
Parameters
modal: Default: False
public void RemoveMenus()
Remove all menus
public void RemoveOptions()
Remove all options
public void RemoveWidget(Editor.Widget widget)
public void RemoveWidgets()
Remove all widgets
No results match this filter.
Properties
Showing 12 properties
public bool Editor.Menu.HasMenus { get; set; }
public bool Editor.Menu.HasOptions { get; set; }
public string Editor.Menu.Icon { get; set; }
public int Editor.Menu.MenuCount { get; set; }
public int Editor.Menu.OptionCount { get; set; }
public virtual string Editor.Menu.ToolTip { get; set; }
public bool Editor.Menu.ToolTipsVisible { get; set; }
This property holds whether tooltips of menu actions should be visible. This property specifies whether action menu entries show their tooltip. By default, this property is `false`.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Editor |
| Type | class |
| Assembly | Sandbox.Tools |
| Doc ID | T:Editor.Menu |