Cleanup
This commit is contained in:
@@ -177,11 +177,11 @@ public class DesktopInput extends InputHandler{
|
||||
isShooting = false;
|
||||
}
|
||||
|
||||
if(!state.is(State.menu) && Core.input.keyTap(Binding.minimap) && !scene.hasDialog() && !(scene.getKeyboardFocus() instanceof TextField)){
|
||||
if(state.isGame() && Core.input.keyTap(Binding.minimap) && !scene.hasDialog() && !(scene.getKeyboardFocus() instanceof TextField)){
|
||||
ui.minimapfrag.toggle();
|
||||
}
|
||||
|
||||
if(state.is(State.menu) || Core.scene.hasDialog()) return;
|
||||
if(state.isMenu() || Core.scene.hasDialog()) return;
|
||||
|
||||
//zoom camera
|
||||
if((!Core.scene.hasScroll() || Core.input.keyDown(Binding.diagonal_placement)) && !ui.chatfrag.shown() && Math.abs(Core.input.axisTap(Binding.zoom)) > 0
|
||||
@@ -491,7 +491,7 @@ public class DesktopInput extends InputHandler{
|
||||
|
||||
@Override
|
||||
public void updateState(){
|
||||
if(state.is(State.menu)){
|
||||
if(state.isMenu()){
|
||||
droppingItem = false;
|
||||
mode = none;
|
||||
block = null;
|
||||
|
||||
@@ -432,7 +432,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
|
||||
@Override
|
||||
public boolean touchDown(int screenX, int screenY, int pointer, KeyCode button){
|
||||
if(state.is(State.menu)) return false;
|
||||
if(state.isMenu()) return false;
|
||||
|
||||
down = true;
|
||||
|
||||
@@ -513,7 +513,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
|
||||
@Override
|
||||
public boolean longPress(float x, float y){
|
||||
if(state.is(State.menu) || mode == none || player.dead()) return false;
|
||||
if(state.isMenu() || mode == none || player.dead()) return false;
|
||||
|
||||
//get tile on cursor
|
||||
Tile cursor = tileAt(x, y);
|
||||
@@ -541,7 +541,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
|
||||
@Override
|
||||
public boolean tap(float x, float y, int count, KeyCode button){
|
||||
if(state.is(State.menu) || lineMode) return false;
|
||||
if(state.isMenu() || lineMode) return false;
|
||||
|
||||
float worldx = Core.input.mouseWorld(x, y).x, worldy = Core.input.mouseWorld(x, y).y;
|
||||
|
||||
@@ -574,7 +574,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
public void update(){
|
||||
super.update();
|
||||
|
||||
if(state.is(State.menu) ){
|
||||
if(state.isMenu() ){
|
||||
selectRequests.clear();
|
||||
removals.clear();
|
||||
mode = none;
|
||||
|
||||
Reference in New Issue
Block a user