Get RAPTOR

RaptorSuiteIconSet

RAPTOR's icon set, made of a tinted ink layer and a coloured subject layer.

NamespaceAssemblyKindStability
Raptor.EditorToolsRaptor.Editorclasspreview, since 0.1.0

Each icon has an ink layer, shown in the caller's tint, and a subject layer, shown in its domain hue at the tint's alpha. The art is stored in Icons/Raptor as 8x masters and downsampled to the exact pixel size on first use.

public static class RaptorSuiteIconSet

Methods

Draw

public static bool Draw(Rect rect, string name, Color tint, float size = Grid, bool mono = false)

Draws both layers of an icon.

ParameterTypeDefaultDescription
rectRectThe rect, in GUI coordinates of the current view. The icon is centred in it.
namestringThe icon name.
tintColorThe ink colour. Its alpha also applies to the subject layer.
sizefloatGridThe size, in points.
monoboolfalseWhether to draw the subject layer in the ink colour too, as on header and primary chips (.headchip .i, .chip.prim .i). When false, a disabled icon keeps its hue over grey strokes.

Returns: True when the icon has art, including outside Repaint. When false, draw the missing-icon placeholder.

GetMask

public static Texture2D GetMask(string name, float logicalSize = Grid)

Returns a white mask of both layers at the exact pixel size. Use Draw for the subject hue.

ParameterTypeDefaultDescription
namestringThe icon name.
logicalSizefloatGridThe size, in points.

Returns: The texture, or null when there is no art.

Has

public static bool Has(string name)

Whether an icon name has RAPTOR art.

ParameterTypeDescription
namestringThe icon name.

Returns: True when Draw can draw this icon.