Fixed a few minor bugs with scrolling in editor

This commit is contained in:
Anuken
2018-05-23 22:23:52 -04:00
parent 9693de8885
commit e4231e012d
4 changed files with 22 additions and 8 deletions

View File

@@ -42,8 +42,6 @@ public class DesktopInput extends InputHandler{
@Override
public void update(){
updateController();
if(player.isDead()) return;
if(Inputs.keyRelease(section, "select") && recipe != null){
@@ -213,7 +211,8 @@ public class DesktopInput extends InputHandler{
return controlling;
}
void updateController(){
@Override
public void updateController(){
boolean mousemove = Gdx.input.getDeltaX() > 1 || Gdx.input.getDeltaY() > 1;
if(KeyBinds.getSection(section).device.type == DeviceType.controller && (!mousemove || player.playerIndex > 0)){

View File

@@ -57,6 +57,7 @@ public abstract class InputHandler extends InputAdapter{
public int getBlockEndY(){ return Mathf.sclb(Graphics.world(getCursorEndX(), getCursorEndY()).y, tilesize, round2()); }
public void resetCursor(){}
public boolean isCursorVisible(){ return false; }
public void updateController(){}
public float mouseAngle(float x, float y){
return Graphics.world(getMouseX(), getMouseY()).sub(x, y).angle();