RaptorSuiteTopBarSlots
Adds controls to the right side of the RAPTOR top bar, left of the Display field.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
Slots draw from right to left. The class works like RaptorSuitePaneHeaderSlots.
public static class RaptorSuiteTopBarSlotsFields
FieldHeight
public const float FieldHeight;The height of a top-bar field, matching Display and Workspace.
FieldY
public const float FieldY;The y position of a top-bar field in the 40-pt tab bar, matching Display and Workspace.
Methods
Field
public static bool Field(Rect rect, string iconGlyph, string label, bool active = false)Draws a dropdown-style field with an icon, label and chevron, like Display. Use it for a field that opens a custom popup.
| Parameter | Type | Default | Description |
|---|---|---|---|
rect | Rect | The rect in GUI coordinates of the current view. | |
iconGlyph | string | An icon name. | |
label | string | The label. | |
active | bool | false | Whether the field is active. |
Returns: True when clicked.
FieldWidth
public static float FieldWidth(string label)Gets the natural width of a Field with this label, including padding, glyph, chevron and 8-point gaps.
| Parameter | Type | Description |
|---|---|---|
label | string | The label. |
Returns: The width in points.
Register
public static void Register(Slot slot)Adds a slot. Adding the same delegate again does nothing.
| Parameter | Type | Description |
|---|---|---|
slot | Slot | The slot. |
Call from an [InitializeOnLoad] static constructor on the main thread. A slot that throws is logged and does not stop the others.
RepaintLive
public static void RepaintLive(SceneView view)Repaints the top bar live instead of from its cache. Call it for a slot whose content changes without input, such as a progress readout.
| Parameter | Type | Description |
|---|---|---|
view | SceneView | The 3D view. |
Unregister
public static void Unregister(Slot slot)Removes a slot.
| Parameter | Type | Description |
|---|---|---|
slot | Slot | The slot. |
Related types
- RaptorSuiteTopBarSlots.Slot: Draws into the top bar's free space between left and right.
- RaptorSuitePaneHeaderSlots: Adds controls to the RAPTOR 3D pane header from tools outside the Suite.