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

@@ -44,6 +44,11 @@ public class ChangelogDialog extends FloatingDialog{
table.row();
table.add("$text.changelog.error.android").padTop(8);
}
if(Vars.ios){
table.row();
table.add("$text.changelog.error.ios").padTop(8);
}
}else{
for(VersionInfo info : versions){
Table in = new Table("clear");

View File

@@ -35,7 +35,7 @@ public class PausedDialog extends FloatingDialog{
if(!Net.active()) state.set(State.paused);
});
if(!android){
if(!mobile){
content().defaults().width(220).height(50);
content().addButton("$text.back", () -> {

View File

@@ -85,7 +85,7 @@ public class SettingsMenuDialog extends SettingsDialog{
menu.addButton("$text.settings.graphics", () -> visible(1));
menu.row();
menu.addButton("$text.settings.sound", () -> visible(2));
if(!Vars.android) {
if(!Vars.mobile) {
menu.row();
menu.addButton("$text.settings.controls", ui.controls::show);
}
@@ -143,7 +143,7 @@ public class SettingsMenuDialog extends SettingsDialog{
}
}
if(!android && !gwt) {
if(!mobile && !gwt) {
graphics.checkPref("vsync", true, b -> Gdx.graphics.setVSync(b));
graphics.checkPref("fullscreen", false, b -> {
if (b) {

View File

@@ -186,7 +186,7 @@ public class BlocksFragment implements Fragment{
row();
if(!android) {
if(!mobile) {
weapons = new table("button").margin(0).fillX().end().get();
}
@@ -199,7 +199,7 @@ public class BlocksFragment implements Fragment{
}
public void updateWeapons(){
if(android) return;
if(mobile) return;
weapons.clearChildren();
weapons.left();

View File

@@ -107,12 +107,12 @@ public class ChatFragment extends Table implements Fragment{
add(chatfield).padBottom(offsety).padLeft(offsetx).growX().padRight(offsetx).height(28);
if(Vars.android) {
if(Vars.mobile) {
marginBottom(105f);
marginRight(240f);
}
if(Vars.android) {
if(Vars.mobile) {
addImageButton("icon-arrow-right", 14 * 2, this::toggle).size(46f, 51f).visible(() -> chatOpen).pad(2f);
}
}

View File

@@ -66,14 +66,14 @@ public class HudFragment implements Fragment{
}).get();
new imagebutton("icon-pause", isize, () -> {
if(android) DebugFragment.printDebugInfo();
if (Net.active() && android) {
if(mobile) DebugFragment.printDebugInfo();
if (Net.active() && mobile) {
ui.listfrag.visible = !ui.listfrag.visible;
} else {
state.set(state.is(State.paused) ? State.playing : State.paused);
}
}).update(i -> {
if (Net.active() && android) {
if (Net.active() && mobile) {
i.getStyle().imageUp = Core.skin.getDrawable("icon-players");
} else {
i.setDisabled(Net.active());
@@ -82,7 +82,7 @@ public class HudFragment implements Fragment{
}).get();
new imagebutton("icon-settings", isize, () -> {
if (Net.active() && android) {
if (Net.active() && mobile) {
if (ui.chatfrag.chatOpen()) {
ui.chatfrag.hide();
} else {
@@ -92,7 +92,7 @@ public class HudFragment implements Fragment{
ui.settings.show();
}
}).update(i -> {
if (Net.active() && android) {
if (Net.active() && mobile) {
i.getStyle().imageUp = Core.skin.getDrawable("icon-chat");
} else {
i.getStyle().imageUp = Core.skin.getDrawable("icon-settings");

View File

@@ -18,7 +18,7 @@ public class MenuFragment implements Fragment{
new table(){{
visible(() -> state.is(State.menu));
if(!android){
if(!mobile){
new table(){{
float w = 200f;

View File

@@ -29,7 +29,7 @@ public class PlacementFragment implements Fragment{
Label modelabel;
public void build(){
if(!android) return;
if(!mobile) return;
InputHandler input = control.input();

View File

@@ -63,7 +63,7 @@ public class PlayerListFragment implements Fragment{
}}.end();
update(t -> {
if(!android){
if(!mobile){
visible = Inputs.keyDown("player_list");
}
if(!(Net.active() && !state.is(State.menu))){

View File

@@ -11,8 +11,6 @@ import io.anuke.ucore.core.Core;
import io.anuke.ucore.core.Graphics;
import io.anuke.ucore.scene.ui.layout.Table;
import static io.anuke.mindustry.Vars.*;
public class ToolFragment implements Fragment{
private Table tools;
public int px, py, px2, py2;
@@ -50,7 +48,7 @@ public class ToolFragment implements Fragment{
Core.scene.add(tools);
tools.setVisible(() ->
!state.is(State.menu) && android && ((input.recipe != null && state.inventory.hasItems(input.recipe.requirements) &&
!state.is(State.menu) && mobile && ((input.recipe != null && state.inventory.hasItems(input.recipe.requirements) &&
input.placeMode == PlaceMode.cursor) || confirming)
);