RaptorSuiteMenu
The menu used by every RAPTOR dropdown, with icon and label rows, ticks, hotkeys and section headers.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
Inside a RAPTOR window the menu draws on an overlay above all other content and opens upwards from the bottom bar. Elsewhere it opens as a popup window. Choices run on the next editor tick. Modules open a menu with ShowDrawn and draw its rows with RaptorSuiteMenuCard.
public static class RaptorSuiteMenuMethods
CloseDrawn
public static void CloseDrawn()Closes the menu opened with ShowDrawn, if one is open. Does not exit the caller's GUI pass.
ShowDrawn
public static void ShowDrawn(Rect activator, float width, Func<float> height, Action<Rect> draw, Func<bool> live = null)Opens a menu with a custom body instead of rows, using the same card and placement as other Suite menus. It stays open while its controls are used and closes on Esc or a click outside. Text fields in the body receive keyboard input, and a body taller than the available space scrolls. Draw its rows with RaptorSuiteMenuCard.
| Parameter | Type | Default | Description |
|---|---|---|---|
activator | Rect | The rect of the control the menu opens from, in GUI coordinates of the current view. | |
width | float | The card's width. | |
height | Func<float> | Returns the body's height. Called on every event, so the height can change. | |
draw | Action<Rect> | Draws the body in the given rect on every event, without a background. | |
live | Func<bool> | null | While this returns true, the card repaints 10 times a second, for live values. Pass null to turn this off. |
Related types
- RaptorSuiteMenuCard: Rows for a menu with a custom body (RaptorSuiteMenu.ShowDrawn), each ending in a switch, number field or segment.