Class SelectionTool

java.lang.Object
group24.escaperoom.ui.editorTools.EditorTool
group24.escaperoom.ui.editorTools.SelectionTool
All Implemented Interfaces:
Drawable
Direct Known Subclasses:
AreaSelector, ItemSelectionTool

public abstract class SelectionTool extends EditorTool implements Drawable
  • Field Details

  • Constructor Details

  • Method Details

    • startSelection

      public void startSelection(float x, float y)
    • getSelection

      public Optional<SelectionTool.Selection> getSelection()
    • endSelection

      public void endSelection()
      End the logical selection
    • cancel

      public void cancel()
      Description copied from class: EditorTool
      Called when the user presses Escape while this is the active tool
      Specified by:
      cancel in class EditorTool
    • getName

      public String getName()
      Specified by:
      getName in class EditorTool
    • select

      public void select()
      Description copied from class: EditorTool
      Called when this tool is selected
      Specified by:
      select in class EditorTool
    • getSelectionArea

      public Optional<com.badlogic.gdx.math.Rectangle> getSelectionArea()
      Returns:
      the active selected area
    • getType

      public ToolManager.ToolType getType()
      Specified by:
      getType in class EditorTool
      Returns:
      the ToolManager.ToolType
    • renderPriority

      public int renderPriority()
      Specified by:
      renderPriority in interface Drawable
      Returns:
      the renderPriority of this Drawable
    • draw

      public void draw(com.badlogic.gdx.graphics.g2d.Batch batch)
      Description copied from interface: Drawable
      Draw this Drawable on the Batch
      Specified by:
      draw in interface Drawable
      Parameters:
      batch - to draw on
    • position

      public com.badlogic.gdx.math.Vector2 position()
      Specified by:
      position in interface Drawable
      Returns:
      coordinates of the lower left corner of this Drawable
    • getTileDepth

      public int getTileDepth()
      Specified by:
      getTileDepth in interface Drawable
      Returns:
      the tile depth of this Drawable