Package mindustry.editor
Class MapObjectivesCanvas.ObjectiveTilemap
java.lang.Object
arc.scene.Element
arc.scene.Group
arc.scene.ui.layout.WidgetGroup
mindustry.editor.MapObjectivesCanvas.ObjectiveTilemap
- All Implemented Interfaces:
arc.scene.utils.Cullable
- Enclosing class:
- MapObjectivesCanvas
public class MapObjectivesCanvas.ObjectiveTilemap
extends arc.scene.ui.layout.WidgetGroup
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionThe connector button that is being pressed.The current tile that is being moved.Fields inherited from class arc.scene.Group
children, cullingArea, transform
Fields inherited from class arc.scene.Element
color, cullable, fillParent, height, name, originX, originY, parent, parentAlpha, rotation, scaleX, scaleY, touchable, touchablility, translation, userObject, visibility, visible, width, x, y
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
createTile
(int x, int y, MapObjectives.MapObjective obj) boolean
void
draw()
protected void
drawCurve
(boolean remove, float x1, float y1, float x2, float y2) float
float
boolean
moveTile
(MapObjectivesCanvas.ObjectiveTilemap.ObjectiveTile tile, int newX, int newY) void
boolean
validPlace
(int x, int y, MapObjectivesCanvas.ObjectiveTilemap.ObjectiveTile ignore) Methods inherited from class arc.scene.ui.layout.WidgetGroup
childrenChanged, getMinHeight, getMinWidth, invalidate, invalidateHierarchy, layout, needsLayout, pack, setFillParent, setLayoutEnabled, sizeChanged, validate
Methods inherited from class arc.scene.Group
act, addChild, addChildAfter, addChildAt, addChildBefore, applyTransform, clear, clearChildren, computeTransform, drawChildren, fill, fill, fill, find, find, findVisible, forEach, getChildren, getCullingArea, hasChildren, hit, isTransform, localToDescendantCoordinates, removeChild, removeChild, resetTransform, setCullingArea, setScene, setTransform, swapActor, swapActor, toString
Methods inherited from class arc.scene.Element
actions, addAction, addCaptureListener, addListener, change, changed, clearActions, clearListeners, clicked, clicked, clicked, clicked, clipBegin, clipBegin, clipEnd, dragged, exited, fire, fireClick, getActions, getCaptureListeners, getHeight, getListeners, getMaxHeight, getMaxWidth, getRight, getRotation, getScene, getTop, getWidth, getX, getY, getZIndex, hasActions, hasKeyboard, hasMouse, hasParent, hasScroll, hovered, isAscendantOf, isDescendantOf, isDescendantOf, isTouchable, keepInStage, keyDown, keyDown, localToAscendantCoordinates, localToParentCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, released, remove, removeAction, removeCaptureListener, removeListener, requestKeyboard, requestScroll, rotateBy, rotationChanged, scaleBy, scaleBy, screenToLocalCoordinates, scrolled, setBounds, setColor, setColor, setHeight, setOrigin, setOrigin, setPosition, setPosition, setRotation, setRotationOrigin, setScale, setScale, setSize, setSize, setTranslation, setWidth, setZIndex, sizeBy, sizeBy, stageToLocalCoordinates, tapped, toBack, toFront, touchable, update, updateVisibility, visible
-
Field Details
-
connecting
The connector button that is being pressed. -
moving
The current tile that is being moved.
-
-
Constructor Details
-
ObjectiveTilemap
public ObjectiveTilemap()
-
-
Method Details
-
draw
public void draw()- Overrides:
draw
in classarc.scene.ui.layout.WidgetGroup
-
drawCurve
protected void drawCurve(boolean remove, float x1, float y1, float x2, float y2) -
validPlace
public boolean validPlace(int x, int y, @Nullable MapObjectivesCanvas.ObjectiveTilemap.ObjectiveTile ignore) -
createTile
-
createTile
-
moveTile
public boolean moveTile(MapObjectivesCanvas.ObjectiveTilemap.ObjectiveTile tile, int newX, int newY) -
removeTile
-
clearTiles
public void clearTiles() -
getPrefWidth
public float getPrefWidth()- Overrides:
getPrefWidth
in classarc.scene.ui.layout.WidgetGroup
-
getPrefHeight
public float getPrefHeight()- Overrides:
getPrefHeight
in classarc.scene.ui.layout.WidgetGroup
-