Skip to content

Tool

Extends: Object

Description

This is an abstract class that all Dungeondraft tools are based off of. You can call or get any properties or functions from this class on all tools.

Properties

Dictionary Controls
Range SizeControl
Button[] SizeButtons

Methods

void Enable ( )
void Disable ( )
void RegisterSizeButtons ( Button[] buttons, int default )

Property Descriptions

  • Dictionary Controls:
    Returns a Dictionary of UI Controls with the control's registered IDs as the keys.

  • Range SizeControl:
    A Range control, typically a slider that determines the size of the brush.

  • Button[] SizeButtons:
    The Buttons assigned to this Tool to modify tool brush sizes.

Method Descriptions

  • void Enable ( ):
    Enables the tool to perform tasks. This is also called internally when a tool is selected in the toolbar. The tool will not work without being first enabled.

  • void Disable ( ):
    Disables the tool. Must be called when you are done with a tool to clean up.

  • void RegisterSizeButtons ( Button[] buttons, int default ):
    Call from the ToolPanel to let this Tool know if there are size buttons for something like a brush.