RaptorSuiteIconSet
RAPTOR's icon set, made of a tinted ink layer and a coloured subject layer.
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | class | preview, 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 RaptorSuiteIconSetMethods
Draw
public static bool Draw(Rect rect, string name, Color tint, float size = Grid, bool mono = false)Draws both layers of an icon.
| Parameter | Type | Default | Description |
|---|---|---|---|
rect | Rect | The rect, in GUI coordinates of the current view. The icon is centred in it. | |
name | string | The icon name. | |
tint | Color | The ink colour. Its alpha also applies to the subject layer. | |
size | float | Grid | The size, in points. |
mono | bool | false | Whether 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.
| Parameter | Type | Default | Description |
|---|---|---|---|
name | string | The icon name. | |
logicalSize | float | Grid | The 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.
| Parameter | Type | Description |
|---|---|---|
name | string | The icon name. |
Returns: True when Draw can draw this icon.