Class SelectionTool
java.lang.Object
group24.escaperoom.ui.editorTools.EditorTool
group24.escaperoom.ui.editorTools.SelectionTool
- All Implemented Interfaces:
Drawable
- Direct Known Subclasses:
AreaSelector,ItemSelectionTool
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Called when the user presses Escape while this is the active toolvoiddraw(com.badlogic.gdx.graphics.g2d.Batch batch) Draw this Drawable on theBatchvoidEnd the logical selectiongetName()Optional<com.badlogic.gdx.math.Rectangle>intgetType()com.badlogic.gdx.math.Vector2position()intvoidselect()Called when this tool is selectedvoidstartSelection(float x, float y) Methods inherited from class group24.escaperoom.ui.editorTools.EditorTool
getButtonStyle, getEditor
-
Field Details
-
selection
-
selecting
protected boolean selecting
-
-
Constructor Details
-
SelectionTool
-
-
Method Details
-
startSelection
public void startSelection(float x, float y) -
getSelection
-
endSelection
public void endSelection()End the logical selection -
cancel
public void cancel()Description copied from class:EditorToolCalled when the user presses Escape while this is the active tool- Specified by:
cancelin classEditorTool
-
getName
- Specified by:
getNamein classEditorTool
-
select
public void select()Description copied from class:EditorToolCalled when this tool is selected- Specified by:
selectin classEditorTool
-
getSelectionArea
- Returns:
- the active selected area
-
getType
- Specified by:
getTypein classEditorTool- Returns:
- the
ToolManager.ToolType
-
renderPriority
public int renderPriority()- Specified by:
renderPriorityin interfaceDrawable- Returns:
- the renderPriority of this Drawable
-
draw
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch) Description copied from interface:DrawableDraw this Drawable on theBatch -
position
public com.badlogic.gdx.math.Vector2 position() -
getTileDepth
public int getTileDepth()- Specified by:
getTileDepthin interfaceDrawable- Returns:
- the tile depth of this Drawable
-