Toolset
Extends: VBoxContainer
Description
This is vertical bar on the left side of UI that holds all the tool buttons and panels.
Accessed by 'Global.Editor.Toolset'.
Properties
| bool | IsShrunk |
| String | PreviousTool |
| Dictionary | Toolbars |
| Dictionary | ToolPanels |
| float | transitionDurationMS |
| float | buttonFullSize |
| float | buttonShrunkSize |
Methods
| void | Shrink ( ) |
| void | Expand ( ) |
| Toolbar | CreateToolbar ( String title, String icon ) |
| void | Enable ( bool value ) |
| void | Init ( ) |
| ToolPanel | CreateModTool ( Reference scriptInstance, String category, String id, String label, String icon ) |
| ToolPanel | GetToolPanel ( String tool ) |
| void | Quickswitch ( String tool ) |
| void | SwitchToPreviousTool ( ) |
Property Descriptions
- bool IsShrunk:
Gets if the toolset is shrunken.
- String PreviousTool:
The name of the previous tool used.
- Dictionary Toolbars:
Lookup table for toolbars by its tool name. Dictionary of String key - Toolbar value.
- Dictionary ToolPanels:
Lookup table for tool panels by its tool name. Dictionary of String key - ToolPanel value.
- float transitionDurationMS:
Get the duration of the transition effect between category selections.
- float buttonFullSize:
Get the full dimension size of a toolset button.
- float buttonShrunkSize:
Get the shrunken dimension size of a toolset button.
Method Descriptions
- void Shrink ( ):
Shrink the toolset.
- void Expand ( ):
Expand the toolset.
- Toolbar CreateToolbar ( String title, String icon ):
Create a new category of tools in its own toolbar.
- void Init ( ):
Initialize the toolset. Called once on launch.
- ToolPanel CreateModTool ( Reference scriptInstance, String category, String id, String label, String icon ):
Create a new mod tool by passing it the mod script and the relevant data. Returns a newly created ToolPanel. Calls Toolbar.CreateTool().
- ToolPanel GetToolPanel ( String tool ):
Gets a ToolPanel by its tool name.
- void Quickswitch ( String tool ):
Instant change to a new tool.
- void SwitchToPreviousTool ( ):
Swap to the last used tool.