Class DesktopInput

java.lang.Object
mindustry.input.InputHandler
mindustry.input.DesktopInput
All Implemented Interfaces:
arc.input.GestureDetector.GestureListener, arc.input.InputProcessor

public class DesktopInput extends InputHandler
  • Field Details

    • movement

      public arc.math.geom.Vec2 movement
    • cursorType

      public arc.Graphics.Cursor cursorType
      Current cursor type.
    • selectX

      public int selectX
      Position where the player started dragging a line.
    • selectY

      public int selectY
      Position where the player started dragging a line.
    • schemX

      public int schemX
      Position where the player started dragging a line.
    • schemY

      public int schemY
      Position where the player started dragging a line.
    • lastLineX

      public int lastLineX
      Last known line positions.
    • lastLineY

      public int lastLineY
      Last known line positions.
    • schematicX

      public int schematicX
      Last known line positions.
    • schematicY

      public int schematicY
      Last known line positions.
    • mode

      public PlaceMode mode
      Whether selecting mode is active.
    • selectScale

      public float selectScale
      Animation scale for line.
    • splan

      @Nullable public BuildPlan splan
      Selected build plan for movement.
    • deleting

      public boolean deleting
      Whether player is currently deleting removal plans.
    • shouldShoot

      public boolean shouldShoot
      Whether player is currently deleting removal plans.
    • panning

      public boolean panning
      Whether player is currently deleting removal plans.
    • movedPlan

      public boolean movedPlan
      Whether player is currently deleting removal plans.
    • panScale

      public float panScale
      Mouse pan speed.
    • panSpeed

      public float panSpeed
      Mouse pan speed.
    • panBoostSpeed

      public float panBoostSpeed
      Mouse pan speed.
    • selectMillis

      public long selectMillis
      Delta time between consecutive clicks.
    • prevSelected

      public Tile prevSelected
      Previously selected tile.
    • lastCtrlGroup

      public int lastCtrlGroup
      Most recently selected control group by index
    • lastCtrlGroupSelectMillis

      public long lastCtrlGroupSelectMillis
      Time of most recent control group selection
  • Constructor Details

    • DesktopInput

      public DesktopInput()
  • Method Details

    • buildUI

      public void buildUI(arc.scene.Group group)
      Overrides:
      buildUI in class InputHandler
    • drawTop

      public void drawTop()
      Overrides:
      drawTop in class InputHandler
    • drawBottom

      public void drawBottom()
      Overrides:
      drawBottom in class InputHandler
    • update

      public void update()
      Overrides:
      update in class InputHandler
    • useSchematic

      public void useSchematic(Schematic schem)
      Overrides:
      useSchematic in class InputHandler
    • isBreaking

      public boolean isBreaking()
      Overrides:
      isBreaking in class InputHandler
    • buildPlacementUI

      public void buildPlacementUI(arc.scene.ui.layout.Table table)
      Overrides:
      buildPlacementUI in class InputHandler
    • tap

      public boolean tap(float x, float y, int count, arc.input.KeyCode button)
    • touchDown

      public boolean touchDown(float x, float y, int pointer, arc.input.KeyCode button)
    • selectedBlock

      public boolean selectedBlock()
      Overrides:
      selectedBlock in class InputHandler
    • getMouseX

      public float getMouseX()
      Overrides:
      getMouseX in class InputHandler
    • getMouseY

      public float getMouseY()
      Overrides:
      getMouseY in class InputHandler
    • updateState

      public void updateState()
      Overrides:
      updateState in class InputHandler
    • panCamera

      public void panCamera(arc.math.geom.Vec2 position)
      Description copied from class: InputHandler
      Forces the camera to a position and enables panning on desktop.
      Overrides:
      panCamera in class InputHandler
    • updateMovement

      protected void updateMovement(mindustry.gen.Unit unit)