Package mindustry.editor
Class MapView
java.lang.Object
arc.scene.Element
mindustry.editor.MapView
- All Implemented Interfaces:
arc.input.GestureDetector.GestureListener
public class MapView
extends arc.scene.Element
implements arc.input.GestureDetector.GestureListener
-
Field Summary
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
act
(float delta) void
center()
void
draw()
getTool()
boolean
isGrid()
boolean
pan
(float x, float y, float deltaX, float deltaY) boolean
pinch
(arc.math.geom.Vec2 initialPointer1, arc.math.geom.Vec2 initialPointer2, arc.math.geom.Vec2 pointer1, arc.math.geom.Vec2 pointer2) void
void
setGrid
(boolean grid) void
setTool
(EditorTool tool) boolean
zoom
(float initialDistance, float distance) Methods inherited from class arc.scene.Element
actions, addAction, addCaptureListener, addListener, change, changed, clear, clearActions, clearListeners, clicked, clicked, clicked, clicked, clipBegin, clipBegin, clipEnd, dragged, exited, fire, fireClick, getActions, getCaptureListeners, getHeight, getListeners, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getPrefHeight, getPrefWidth, getRight, getRotation, getScene, getTop, getWidth, getX, getY, getZIndex, hasActions, hasKeyboard, hasMouse, hasParent, hasScroll, hit, hovered, invalidate, invalidateHierarchy, isAscendantOf, isDescendantOf, isDescendantOf, isTouchable, keepInStage, keyDown, keyDown, layout, localToAscendantCoordinates, localToParentCoordinates, localToStageCoordinates, moveBy, needsLayout, notify, pack, parentToLocalCoordinates, released, remove, removeAction, removeCaptureListener, removeListener, requestKeyboard, requestScroll, rotateBy, rotationChanged, scaleBy, scaleBy, screenToLocalCoordinates, scrolled, setBounds, setColor, setColor, setFillParent, setHeight, setLayoutEnabled, setOrigin, setOrigin, setPosition, setPosition, setRotation, setRotationOrigin, setScale, setScale, setScene, setSize, setSize, setTranslation, setWidth, setZIndex, sizeBy, sizeBy, sizeChanged, stageToLocalCoordinates, tapped, toBack, toFront, toString, touchable, update, updateVisibility, validate, visible
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface arc.input.GestureDetector.GestureListener
fling, longPress, panStop, tap, touchDown
-
Constructor Details
-
MapView
public MapView()
-
-
Method Details
-
getTool
-
setTool
-
isGrid
public boolean isGrid() -
setGrid
public void setGrid(boolean grid) -
center
public void center() -
act
public void act(float delta) - Overrides:
act
in classarc.scene.Element
-
draw
public void draw()- Overrides:
draw
in classarc.scene.Element
-
pan
public boolean pan(float x, float y, float deltaX, float deltaY) - Specified by:
pan
in interfacearc.input.GestureDetector.GestureListener
-
zoom
public boolean zoom(float initialDistance, float distance) - Specified by:
zoom
in interfacearc.input.GestureDetector.GestureListener
-
pinch
public boolean pinch(arc.math.geom.Vec2 initialPointer1, arc.math.geom.Vec2 initialPointer2, arc.math.geom.Vec2 pointer1, arc.math.geom.Vec2 pointer2) - Specified by:
pinch
in interfacearc.input.GestureDetector.GestureListener
-
pinchStop
public void pinchStop()- Specified by:
pinchStop
in interfacearc.input.GestureDetector.GestureListener
-