RaptorSuiteTheme
Colours, sizes, fonts and drawing helpers for the RAPTOR Suite.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, since 0.1.0 |
public static class RaptorSuiteThemeFields
Accent
public static readonly Color Accent;The accent colour.
Background
public static readonly Color Background;The window background.
Border
public static readonly Color Border;Hairlines and panel edges.
Chip
public static readonly Color Chip;A resting chip's fill.
ChipHover
public static readonly Color ChipHover;A hovered chip's fill.
ChipLit
public static readonly Color ChipLit;The fill of a lit chip or current icon button.
ChipPressed
public static readonly Color ChipPressed;A pressed chip's fill.
ControlRadius
public const float ControlRadius;A control's corner radius.
Disabled
public static readonly Color Disabled;Disabled ink.
DrawerBand
public static readonly Color DrawerBand;The fill of the strip under a drawer's title bar.
DrawerHeader
public static readonly Color DrawerHeader;A drawer header's fill.
DrawerSidebar
public static readonly Color DrawerSidebar;The fill of a drawer's left column, such as a module's palette or the Materials and Props libraries. It is darker than DrawerSurface.
DrawerSurface
public static readonly Color DrawerSurface;A drawer's fill.
Error
public static readonly Color Error;Error ink. Always pair it with an icon and a label.
Footer
public static readonly Color Footer;The status bar's fill.
Info
public static readonly Color Info;Information ink. Always pair it with an icon and a label.
KeycapFace
public static readonly Color KeycapFace;A keycap's face.
KeycapLip
public static readonly Color KeycapLip;A keycap's lip.
Muted
public static readonly Color Muted;The fill of bands, fused action rows and read-only wells.
OptionsBar
public static readonly Color OptionsBar;The options bar's fill.
Panel
public static readonly Color Panel;A panel's fill.
PanelHeader
public static readonly Color PanelHeader;A panel header's fill.
PanelRadius
public const float PanelRadius;A panel's corner radius.
Popover
public static readonly Color Popover;The fill of menus, tooltips and floating panels.
PrimaryFill
public static readonly Color PrimaryFill;The solid primary fill. Use it for one control per surface at most.
PrimaryHover
public static readonly Color PrimaryHover;The solid primary fill on hover.
PrimaryInk
public static readonly Color PrimaryInk;Text and icon colour on the solid primary fill.
Rail
public static readonly Color Rail;The toolbar's fill.
Raised
public static readonly Color Raised;A raised surface's fill.
RingHover
public static readonly Color RingHover;The outline of a hovered input.
RingLine
public static readonly Color RingLine;The outline of an input at rest, and of menus and hovered chips.
RowHover
public static readonly Color RowHover;The pill fill under a hovered row, tile or bare icon button.
RowRadius
public const float RowRadius;The corner radius of row pills and of the context bar's large chips.
RowSelected
public static readonly Color RowSelected;The pill fill under the current row.
ScrollGutter
public const float ScrollGutter;The width of a scrollbar's gutter. Reserve it even when the scrollbar is hidden, so content does not reflow.
Secondary
public static readonly Color Secondary;Secondary text.
Selected
public static readonly Color Selected;A selected row's fill.
Success
public static readonly Color Success;Success ink. Always pair it with an icon and a label.
TabBar
public static readonly Color TabBar;The tab bar's fill.
Text
public static readonly Color Text;Primary text.
Tile
public static readonly Color Tile;A tile's resting fill when the quiet-fill setting is on. Otherwise tiles have no resting fill.
TileHover
public static readonly Color TileHover;A tile's hover fill when the quiet-fill setting is on. Otherwise tiles use RowHover.
Warning
public static readonly Color Warning;Warning ink. Always pair it with an icon and a label.
WindowRadius
public const float WindowRadius;The corner radius of window-sized surfaces, such as the Settings page and dialogs.
Properties
CategoryHeader
public static GUIStyle CategoryHeader { get; }A folding category or menu header. Geist 12 medium.
Centered
public static GUIStyle Centered { get; }The centred label style.
FontMedium
public static Font FontMedium { get; }The text font, medium weight. Null until the font is imported.
FontMono
public static Font FontMono { get; }The number font, JetBrains Mono regular. Null until the font is imported.
FontMonoMedium
public static Font FontMonoMedium { get; }The number font, medium weight. Null until the font is imported.
FontRegular
public static Font FontRegular { get; }The text font, Geist regular. Null until the font is imported.
FontSemiBold
public static Font FontSemiBold { get; }The text font, semibold weight, for title lines only. Null until the font is imported.
FormLabel
public static GUIStyle FormLabel { get; }A form label, as on Inspector fields and card rows. Geist 13 regular.
GroupLabel
public static GUIStyle GroupLabel { get; }A group label that does not fold. Geist 12 regular.
Heading
public static GUIStyle Heading { get; }The heading style, for panel titles. Geist 14 semibold.
InputNumber
public static GUIStyle InputNumber { get; }Numbers inside an InputBox. JetBrains Mono 13, so digits keep their width while a value is dragged.
InputText
public static GUIStyle InputText { get; }Text inside an InputBox. Based on the label style, so Unity's field skin does not draw a second box.
KeyCap
public static GUIStyle KeyCap { get; }Keycap text. JetBrains Mono 11 medium.
Label
public static GUIStyle Label { get; }The regular label style, for control labels. Geist 14 regular.
MetaValue
public static GUIStyle MetaValue { get; }A count or size in a footer or row. JetBrains Mono 12 regular.
ObjectName
public static GUIStyle ObjectName { get; }The selected object's name in the Inspector. Geist 16 medium.
PageSection
public static GUIStyle PageSection { get; }A group title on a page. Geist 16 semibold.
PageTitle
public static GUIStyle PageTitle { get; }A page title, as on the Settings page and dialogs. Geist 22 semibold.
PanelSectionTitle
public static GUIStyle PanelSectionTitle { get; }The title of a folding panel section, one size above its rows and group labels. Geist 14 medium.
PanelTitle
public static GUIStyle PanelTitle { get; }A panel title. Geist 14 semibold.
PrimaryWord
public static GUIStyle PrimaryWord { get; }Text on the solid primary fill. Geist 14 medium.
ScrollbarHorizontal
public static GUIStyle ScrollbarHorizontal { get; }The thin horizontal scrollbar's track style.
ScrollbarVertical
public static GUIStyle ScrollbarVertical { get; }The thin vertical scrollbar's track style.
Small
public static GUIStyle Small { get; }The small label style, for metadata keys and footer text. Geist 12 regular.
Surface
public static Color Surface { get; set; }The panel background colour. It is Panel when docked and DrawerSurface while the panel is shown in a drawer.
ToolbarDropDown
public static GUIStyle ToolbarDropDown { get; }The dropdown style.
TooltipText
public static GUIStyle TooltipText { get; }Tooltip text. Geist 12 regular.
Unit
public static GUIStyle Unit { get; }A unit label inside a field. Geist 12 regular.
ValueNumber
public static GUIStyle ValueNumber { get; }A number in a field. JetBrains Mono 13 regular.
Methods
BareFill
public static void BareFill(Rect r, bool active, bool hovered, bool pressed = false)Draws the fill of a bare control, such as a toolbar tool, the Perspective button or a header action. Draws nothing at rest, a pill on hover and a light blue fill when current.
| Parameter | Type | Default | Description |
|---|---|---|---|
| r | Rect | The rect in GUI coordinates of the current view. | |
active | bool | Whether the control is lit. | |
hovered | bool | Whether the pointer is over the control. | |
pressed | bool | false | Whether the control is pressed. |
BeginScroll
public static Vector2 BeginScroll(Rect view, Vector2 position, Rect content)Begins a scroll view with Suite scrollbars. End it with GUI.EndScrollView().
| Parameter | Type | Description |
|---|---|---|
view | Rect | The visible area, including gutters. |
position | Vector2 | The scroll position. |
content | Rect | The content area. |
Returns: The new scroll position.
BeginScrollLayout
public static Vector2 BeginScrollLayout(Vector2 position)Begins a layout scroll view. End it with EndScrollLayout, which draws Suite scrollbars from the laid-out rects. Leave ScrollGutter free on the right of the content.
| Parameter | Type | Description |
|---|---|---|
position | Vector2 | The scroll position. |
Returns: The new scroll position.
ChipFill
public static void ChipFill(Rect r, bool active, bool hovered, bool pressed = false)Draws the chip fill of a button-like control, such as an options-bar choice or a dropdown.
| Parameter | Type | Default | Description |
|---|---|---|---|
| r | Rect | The rect in GUI coordinates of the current view. | |
active | bool | Whether the control is lit. | |
hovered | bool | Whether the pointer is over the control. | |
pressed | bool | false | Whether the control is pressed. |
DrawIcon
public static void DrawIcon(Rect rect, string icon, bool active = false)Draws a non-interactive icon in the toolbar's style.
| Parameter | Type | Default | Description |
|---|---|---|---|
rect | Rect | The rect in GUI coordinates of the current view. | |
icon | string | The icon name. | |
active | bool | false | Whether the icon is shown lit. |
EndScrollLayout
public static void EndScrollLayout(ref Vector2 position)Ends a BeginScrollLayout view and handles its scrollbars. The content size comes from the last element laid out in the view.
| Parameter | Type | Description |
|---|---|---|
position | ref Vector2 | The scroll position, updated by the scrollbars. |
Fill
public static void Fill(Rect r, Color colour, float radius = ControlRadius)Draws a rounded, anti-aliased fill on Repaint. The radius is clamped to half the shorter side.
| Parameter | Type | Default | Description |
|---|---|---|---|
| r | Rect | The rect in GUI coordinates of the current view. | |
colour | Color | The fill colour. | |
radius | float | ControlRadius | The corner radius, in points. |
IconButton
public static bool IconButton(Rect rect, string icon, string tooltip, bool active = false, bool drawBackground = true)Draws an icon button in the toolbar's style.
| Parameter | Type | Default | Description |
|---|---|---|---|
rect | Rect | The rect in GUI coordinates of the current view. | |
icon | string | The icon name. | |
tooltip | string | The tooltip, or null. | |
active | bool | false | Whether the icon is shown lit. |
drawBackground | bool | true | Whether to draw the chip behind the icon. |
Returns: True when clicked.
InputBox
public static void InputBox(Rect r, bool focused)Draws a recessed input box for a number or text field. It has a dark fill and a thin ring that lightens on hover and turns to the accent colour when focused.
| Parameter | Type | Description |
|---|---|---|
| r | Rect | The rect in GUI coordinates of the current view. |
focused | bool | Whether the field has keyboard focus. |
Ring
public static void Ring(Rect r, Color colour, float radius = ControlRadius)Draws a 1 pt rounded ring inside r.
| Parameter | Type | Default | Description |
|---|---|---|---|
| r | Rect | The rect in GUI coordinates of the current view. | |
colour | Color | The ring colour. | |
radius | float | ControlRadius | The corner radius, in points. |
Shadow
public static void Shadow(Rect r, float radius, float spread = 16f, float drop = 8f, float alpha = .5f)Draws a soft shadow under a floating card: the smooth blur of the card's rounded shape, offset slightly downwards. Every menu, page and toast that floats uses it. Draws on Repaint only.
| Parameter | Type | Default | Description |
|---|---|---|---|
| r | Rect | The card's rect. | |
radius | float | The card's corner radius. | |
spread | float | 16f | How far the shadow reaches past the card's edge, in points (one and a half times a CSS blur radius). |
drop | float | 8f | The shadow's downward offset from the card. |
alpha | float | .5f | How dark the shadow is where it is full, under the card (a CSS shadow colour's alpha). |
Snap
public static Rect Snap(Rect r)Snaps a rect to whole device pixels. Text always draws on the pixel grid, but icons and rounded fills do not, so a fractional rect puts them out of line with the text. A fractional popup activator also offsets the popup's first row.
| Parameter | Type | Description |
|---|---|---|
| r | Rect | The rect in GUI coordinates of the current view. |
Returns: The snapped rect.
Typed
public static GUIStyle Typed(GUIStyle style, Font face = null)Applies the Suite font to a style built from a Unity skin and clears any synthetic bold. If the font is not loaded, the style keeps its original font.
| Parameter | Type | Default | Description |
|---|---|---|---|
style | GUIStyle | The style to change. | |
face | Font | null | The font, or null for FontRegular. |
Returns: style, so the call can wrap a new style inline.