Class ItemBrush
java.lang.Object
group24.escaperoom.ui.editorTools.EditorTool
group24.escaperoom.ui.editorTools.Brush
group24.escaperoom.ui.editorTools.ItemBrush
- Direct Known Subclasses:
TiledBrush
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondraw(int x, int y) getItem()getName()voidhandleDrag(float x, float y) booleanhandleTouchDown(float x, float y) voidHandle a touchup eventbooleanmatchingItemAt(Types.IntVector2 checkPos, Types.IntVector2 matchToPos, MapScreen editor, Item itemToMatch) Given some position, aMapScreenand an item to match against, return an optional of a matching item at that position.protected voidplaceAt(Item newItem, Types.IntVector2 newPosition) voidMethods inherited from class group24.escaperoom.ui.editorTools.EditorTool
getButtonStyle, getEditor
-
Constructor Details
-
ItemBrush
-
-
Method Details
-
handleTouchUp
public void handleTouchUp()Description copied from class:BrushHandle a touchup event- Specified by:
handleTouchUpin classBrush
-
setItem
-
handleDrag
public void handleDrag(float x, float y) - Specified by:
handleDragin classBrush- Parameters:
x- drag coordy- drag coord
-
handleTouchDown
public boolean handleTouchDown(float x, float y) - Specified by:
handleTouchDownin classBrush- Parameters:
x- touchdown coordy- touchdown coord- Returns:
- whether the brush is handling this event
-
matchingItemAt
protected static Optional<Item> matchingItemAt(Types.IntVector2 checkPos, Types.IntVector2 matchToPos, MapScreen editor, Item itemToMatch) Given some position, aMapScreenand an item to match against, return an optional of a matching item at that position. -
placedItemAt
-
placeAt
-
getName
- Specified by:
getNamein classEditorTool
-
draw
-
isDrawing
public boolean isDrawing() -
getItem
-