Renamed 'android' usage to 'mobile'

This commit is contained in:
Anuken
2018-04-28 11:22:35 -04:00
parent 0db22f2cff
commit cbbd5ffc62
27 changed files with 55 additions and 50 deletions

View File

@@ -20,8 +20,8 @@ public abstract class InputHandler extends InputAdapter{
public float breaktime = 0;
public Recipe recipe;
public int rotation;
public PlaceMode placeMode = android ? PlaceMode.cursor : PlaceMode.hold;
public PlaceMode breakMode = android ? PlaceMode.none : PlaceMode.holdDelete;
public PlaceMode placeMode = mobile ? PlaceMode.cursor : PlaceMode.hold;
public PlaceMode breakMode = mobile ? PlaceMode.none : PlaceMode.holdDelete;
public PlaceMode lastPlaceMode = placeMode;
public PlaceMode lastBreakMode = breakMode;

View File

@@ -28,7 +28,7 @@ public enum PlaceMode{
float x = tilex * tilesize;
float y = tiley * tilesize;
boolean valid = control.input().validPlace(tilex, tiley, control.input().recipe.result) && (android || control.input().cursorNear());
boolean valid = control.input().validPlace(tilex, tiley, control.input().recipe.result) && (mobile || control.input().cursorNear());
Vector2 offset = control.input().recipe.result.getPlaceOffset();
@@ -89,7 +89,7 @@ public enum PlaceMode{
tile = tile.getLinked();
float fin = control.input().breaktime / tile.getBreakTime();
if(android && control.input().breaktime > 0){
if(mobile && control.input().breaktime > 0){
Draw.color(Colors.get("breakStart"), Colors.get("break"), fin);
Lines.poly(tile.drawx(), tile.drawy(), 25, 4 + (1f - fin) * 26);
}
@@ -170,7 +170,7 @@ public enum PlaceMode{
tilex = this.tilex; tiley = this.tiley;
endx = this.endx; endy = this.endy;
if(android){
if(mobile){
ToolFragment t = ui.toolfrag;
if(!t.confirming || t.px != tilex || t.py != tiley || t.px2 != endx || t.py2 != endy) {
t.confirming = true;
@@ -236,7 +236,7 @@ public enum PlaceMode{
}
public void draw(int tilex, int tiley, int endx, int endy){
if(android && !Gdx.input.isTouched(0) && !control.showCursor()){
if(mobile && !Gdx.input.isTouched(0) && !control.showCursor()){
return;
}