Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Tool

Hierarchy

  • Tool

Index

Properties

enabled

enabled: boolean

Whether this tool is enabled.

icon

icon: string

File name of an icon. If set, the icon is shown on the tool bar and the name becomes the tool tip.

map

map: TileMap

Currently active tile map.

name

name: string

Name of the tool as shown on the tool bar.

preview

preview: TileMap

Get or set the preview for tile layer edits.

selectedTile

selectedTile: any

The last clicked tile for the active map. See also the MapEditor.currentBrush property.

statusInfo

statusInfo: string

Text shown in the status bar while the tool is active.

tilePosition

tilePosition: point

Mouse cursor position in tile coordinates.

Methods

activated

  • activated(): void
  • Called when the tool was activated.

deactivated

  • deactivated(): void
  • Called when the tool was deactivated.

keyPressed

  • keyPressed(key: string, modifiers: any): void
  • Called when a key was pressed while the tool was active.

languageChanged

  • languageChanged(): void
  • Called when the language was changed.

mapChanged

  • Called when the active map was changed.

modifiersChanged

  • modifiersChanged(modifiers: any): void
  • Called when the active modifier keys changed.

mouseDoubleClicked

  • mouseDoubleClicked(button: any, x: number, y: number, modifiers: any): void
  • Called when a mouse button was double-clicked.

mouseEntered

  • mouseEntered(): void
  • Called when the mouse entered the map view.

mouseLeft

  • mouseLeft(): void
  • Called when the mouse left the map view.

mouseMoved

  • mouseMoved(x: number, y: number, modifiers: any): void
  • Called when the mouse position in the map scene changed.

mousePressed

  • mousePressed(button: any, x: number, y: number, modifiers: any): void
  • Called when a mouse button was pressed.

mouseReleased

  • mouseReleased(button: any, x: number, y: number, modifiers: any): void
  • Called when a mouse button was released.

tilePositionChanged

  • tilePositionChanged(): void
  • Called when the hovered tile position changed.

updateEnabledState

  • updateEnabledState(): void
  • Called when the map or the current layer changed.

updateStatusInfo

  • updateStatusInfo(): void
  • Called when the hovered tile position changed.

    Used to override the default updating of the status bar text.

Generated using TypeDoc