From 3d18b7f4e3142dfd51c3295ec8cc586a69f550dc Mon Sep 17 00:00:00 2001 From: DeltaNedas Date: Mon, 24 Aug 2020 11:30:27 +0100 Subject: [PATCH] make input fields public --- core/src/mindustry/input/DesktopInput.java | 8 ++++---- core/src/mindustry/input/MobileInput.java | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/src/mindustry/input/DesktopInput.java b/core/src/mindustry/input/DesktopInput.java index 58db9860d5..78038a562b 100644 --- a/core/src/mindustry/input/DesktopInput.java +++ b/core/src/mindustry/input/DesktopInput.java @@ -27,19 +27,19 @@ import static mindustry.Vars.*; import static mindustry.input.PlaceMode.*; public class DesktopInput extends InputHandler{ - private Vec2 movement = new Vec2(); + public Vec2 movement = new Vec2(); /** Current cursor type. */ - private Cursor cursorType = SystemCursor.arrow; + public Cursor cursorType = SystemCursor.arrow; /** Position where the player started dragging a line. */ private int selectX, selectY, schemX, schemY; /** Last known line positions.*/ private int lastLineX, lastLineY, schematicX, schematicY; /** Whether selecting mode is active. */ - private PlaceMode mode; + public PlaceMode mode; /** Animation scale for line. */ private float selectScale; /** Selected build request for movement. */ - private @Nullable BuildPlan sreq; + public @Nullable BuildPlan sreq; /** Whether player is currently deleting removal requests. */ private boolean deleting = false, shouldShoot = false; diff --git a/core/src/mindustry/input/MobileInput.java b/core/src/mindustry/input/MobileInput.java index 24be7b1440..9f719ce7bb 100644 --- a/core/src/mindustry/input/MobileInput.java +++ b/core/src/mindustry/input/MobileInput.java @@ -34,8 +34,8 @@ public class MobileInput extends InputHandler implements GestureListener{ private final float edgePan = Scl.scl(60f); //gesture data - private Vec2 vector = new Vec2(), movement = new Vec2(), targetPos = new Vec2(); - private float lastZoom = -1; + public Vec2 vector = new Vec2(), movement = new Vec2(), targetPos = new Vec2(); + public float lastZoom = -1; /** Position where the player started dragging a line. */ private int lineStartX, lineStartY, lastLineX, lastLineY; @@ -44,7 +44,7 @@ public class MobileInput extends InputHandler implements GestureListener{ private float lineScale; /** Animation data for crosshair. */ private float crosshairScale; - private Teamc lastTarget; + public Teamc lastTarget; /** Used for shifting build requests. */ private float shiftDeltaX, shiftDeltaY; @@ -55,15 +55,15 @@ public class MobileInput extends InputHandler implements GestureListener{ /** Whether the player is currently in line-place mode. */ private boolean lineMode, schematicMode; /** Current place mode. */ - private PlaceMode mode = none; + public PlaceMode mode = none; /** Whether no recipe was available when switching to break mode. */ - private Block lastBlock; + public Block lastBlock; /** Last placed request. Used for drawing block overlay. */ - private BuildPlan lastPlaced; + public BuildPlan lastPlaced; /** Down tracking for panning.*/ private boolean down = false; - private Teamc target, moveTarget; + public Teamc target, moveTarget; //region utility methods