IRaptorDockExtension
A per-drawer extension of the Materials drawer (RaptorMaterialsDrawer.RegisterExtension).
| Namespace | Assembly | Kind | Stability |
|---|---|---|---|
Raptor.EditorTools | Raptor.Editor | interface | preview, since 0.1.0 |
Each open drawer creates its own instance on first use and disposes of it when the drawer closes. Members are called on the editor's GUI thread, in registration order.
public interface IRaptorDockExtension : IDisposableProperties
HasUnsavedWork
bool HasUnsavedWork { get; }Whether the extension has unsaved work. The Materials tab shows a dot while this is true.
Read by RAPTOR.
Methods
AppendTileMenu
void AppendTileMenu(RaptorSuiteControls.Menu menu, RaptorMaterialTile tile, Material material)Adds rows to a tile's context menu, after the palette rows and before "Default for unpainted faces".
| Parameter | Type | Description |
|---|---|---|
menu | RaptorSuiteControls.Menu | The menu being built. |
tile | RaptorMaterialTile | The tile. |
material | Material | The tile's material. |
Called by RAPTOR.
OnGUI
bool OnGUI(ref Rect area)Called at the start of every drawer GUI event. Return true to take the whole area and skip the tile grid for that event. To draw a strip and keep the grid, shrink area by the strip and return false.
| Parameter | Type | Description |
|---|---|---|
area | ref Rect | The drawer's area. Shrink it by any strip the extension draws. |
Returns: True to take the whole area.
Called by RAPTOR.
TryTakeTileClick
bool TryTakeTileClick(RaptorMaterialTile tile)Called when a tile is clicked. Return true to handle the click, in which case the material is not applied.
| Parameter | Type | Description |
|---|---|---|
tile | RaptorMaterialTile | The tile. |
Returns: True to handle the click.
Called by RAPTOR.
Related types
- RaptorSuiteControls.Menu: A grouped Suite menu built on RaptorSuiteMenu.Builder, with a header per group and separators between groups.
- RaptorMaterialsDrawer: Extension points for the Materials drawer.
- RaptorMaterialTile: A Materials drawer tile as passed to an extension (IRaptorDockExtension).