The cursor used by this tool. This will be the cursor set on the viewport of the MapView while the tool is active.
A Qt.QCursor value can be created with tiled.cursor.
Whether this tool is enabled.
File name of the icon, or empty string when not set.
Currently active tile map.
Name of the tool as shown on the tool bar.
Get or set the preview for tile layer edits.
When getting or setting this property, a copy is made. To modify the preview, you need to assign a changed TileMap instance to this property.
To highlight areas that will be erased, use TileLayerEdit.setTile
to set tiles to null
, before assigning the map to the preview.
The last clicked tile for the active map. See also the MapEditor.currentBrush property.
Text shown in the status bar while the tool is active.
The target layer type for which this tool should be enabled. A convenient alternative to overriding updateEnabledState.
The value can be any combination of the layer types Layer.TileLayerType, Layer.ObjectGroupType, Layer.ImageLayerType and Layer.GroupLayerType.
Mouse cursor position in tile coordinates.
Whether this tool uses the currently selected tiles. This defaults to
false
.
When set to false
and the currently selected tiles change while this
tool is active, the Stamp Brush is automatically activated. Set this
property to true
to keep this tool active.
Whether this tool works with Wang sets. This defaults to false
.
When set to false
and a Wang color is clicked while this tool is active,
the Terrain Brush is automatically activated. Set this property to true
to keep this tool active.
Called when the tool was activated.
Called when the tool was deactivated.
Called when a key was pressed while the tool was active.
The keys are defined by numbers from the
Qt::Key enum. They can
be accessed like Qt.Key_Return
.
Called when the language was changed.
Called when the active map was changed.
Called when the active modifier keys changed.
Called when a mouse button was double-clicked.
Called when the mouse entered the map view.
Called when the mouse left the map view.
Called when the mouse position in the map scene changed.
Called when a mouse button was pressed.
Called when a mouse button was released.
Called when the hovered tile position changed.
Called when the map or the current layer changed.
Defining this function is necessary to suppress the default updating of the status bar text.
This function is called automatically when the hovered tile position changed, but statusInfo can be changed in any other function as well.
Generated using TypeDoc
Once a tool is registered using tiled.registerTool, it returns a tool instance. This interface extends the ToolDefinition interface with the additional properties that are available on the tool instance.
Not all properties in the ToolDefinition interface can be changed after the tool has been registered.