mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-19 03:03:59 +07:00
Mobile UI fixes
This commit is contained in:
parent
b45368342d
commit
19c17e96de
BIN
core/assets-raw/sprites/ui/button-edge-4.9.png
Normal file
BIN
core/assets-raw/sprites/ui/button-edge-4.9.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 247 B |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 102 KiB |
@ -25,6 +25,7 @@ ButtonStyle: {
|
|||||||
},
|
},
|
||||||
TextButtonStyle: {
|
TextButtonStyle: {
|
||||||
default: {over: button-over, disabled: button, font: default-font, fontColor: white, disabledFontColor: gray, down: button-down, up: button},
|
default: {over: button-over, disabled: button, font: default-font, fontColor: white, disabledFontColor: gray, down: button-down, up: button},
|
||||||
|
wave: {font: default-font, fontColor: white, disabledFontColor: gray, up: button-edge-4},
|
||||||
clear: {over: flat-over, font: default-font, fontColor: white, disabledFontColor: gray, down: pane, up: flat},
|
clear: {over: flat-over, font: default-font, fontColor: white, disabledFontColor: gray, down: pane, up: flat},
|
||||||
discord: {font: default-font, fontColor: white, up: discord-banner},
|
discord: {font: default-font, fontColor: white, up: discord-banner},
|
||||||
info: {font: default-font, fontColor: white, up: info-banner},
|
info: {font: default-font, fontColor: white, up: info-banner},
|
||||||
|
@ -53,7 +53,6 @@ public class Control extends Module{
|
|||||||
private Throwable error;
|
private Throwable error;
|
||||||
|
|
||||||
public Control(){
|
public Control(){
|
||||||
|
|
||||||
saves = new Saves();
|
saves = new Saves();
|
||||||
unlocks = new Unlocks();
|
unlocks = new Unlocks();
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ import io.anuke.mindustry.core.GameState.State;
|
|||||||
import io.anuke.mindustry.game.EventType.StateChangeEvent;
|
import io.anuke.mindustry.game.EventType.StateChangeEvent;
|
||||||
import io.anuke.mindustry.game.Team;
|
import io.anuke.mindustry.game.Team;
|
||||||
import io.anuke.mindustry.gen.Call;
|
import io.anuke.mindustry.gen.Call;
|
||||||
|
import io.anuke.mindustry.graphics.Palette;
|
||||||
import io.anuke.mindustry.net.Net;
|
import io.anuke.mindustry.net.Net;
|
||||||
import io.anuke.mindustry.net.Packets.AdminAction;
|
import io.anuke.mindustry.net.Packets.AdminAction;
|
||||||
import io.anuke.mindustry.type.Recipe;
|
import io.anuke.mindustry.type.Recipe;
|
||||||
@ -94,6 +95,8 @@ public class HudFragment extends Fragment{
|
|||||||
i.getStyle().imageUp = Core.skin.getDrawable("icon-unlocks");
|
i.getStyle().imageUp = Core.skin.getDrawable("icon-unlocks");
|
||||||
}
|
}
|
||||||
}).get();
|
}).get();
|
||||||
|
|
||||||
|
select.addImage("blank").color(Palette.accent).width(6f).fillY();
|
||||||
});
|
});
|
||||||
|
|
||||||
cont.row();
|
cont.row();
|
||||||
@ -106,7 +109,7 @@ public class HudFragment extends Fragment{
|
|||||||
});
|
});
|
||||||
|
|
||||||
Stack stack = new Stack();
|
Stack stack = new Stack();
|
||||||
TextButton waves = new TextButton("");
|
TextButton waves = new TextButton("", "wave");
|
||||||
Table btable = new Table().margin(0);
|
Table btable = new Table().margin(0);
|
||||||
|
|
||||||
stack.add(waves);
|
stack.add(waves);
|
||||||
@ -116,7 +119,7 @@ public class HudFragment extends Fragment{
|
|||||||
|
|
||||||
addWaveTable(waves);
|
addWaveTable(waves);
|
||||||
addPlayButton(btable);
|
addPlayButton(btable);
|
||||||
cont.add(stack).width(dsize * 4);
|
cont.add(stack).width(dsize * 4 + 6f);
|
||||||
|
|
||||||
cont.row();
|
cont.row();
|
||||||
|
|
||||||
@ -361,8 +364,6 @@ public class HudFragment extends Fragment{
|
|||||||
table.clearChildren();
|
table.clearChildren();
|
||||||
table.setTouchable(Touchable.enabled);
|
table.setTouchable(Touchable.enabled);
|
||||||
|
|
||||||
table.background("button");
|
|
||||||
|
|
||||||
table.labelWrap(() ->
|
table.labelWrap(() ->
|
||||||
world.getSector() == null ?
|
world.getSector() == null ?
|
||||||
(state.enemies() > 0 && state.mode.disableWaveTimer ?
|
(state.enemies() > 0 && state.mode.disableWaveTimer ?
|
||||||
|
@ -165,6 +165,7 @@ public class PlacementFragment extends Fragment{
|
|||||||
frame.addImage("blank").color(Palette.accent).colspan(3).height(3*2).growX();
|
frame.addImage("blank").color(Palette.accent).colspan(3).height(3*2).growX();
|
||||||
frame.row();
|
frame.row();
|
||||||
frame.table("pane-2", blocksSelect -> {
|
frame.table("pane-2", blocksSelect -> {
|
||||||
|
blocksSelect.margin(4).marginTop(0);
|
||||||
blocksSelect.table(blocks -> blockTable = blocks).grow();
|
blocksSelect.table(blocks -> blockTable = blocks).grow();
|
||||||
blocksSelect.row();
|
blocksSelect.row();
|
||||||
blocksSelect.table(input::buildUI).growX();
|
blocksSelect.table(input::buildUI).growX();
|
||||||
|
@ -105,12 +105,12 @@ public class PlayerListFragment extends Fragment{
|
|||||||
float bs = (h + 14) / 2f;
|
float bs = (h + 14) / 2f;
|
||||||
|
|
||||||
button.table(t -> {
|
button.table(t -> {
|
||||||
t.defaults().size(bs - 1, bs + 3);
|
t.defaults().size(bs);
|
||||||
|
|
||||||
t.addImageButton("icon-ban", 14 * 2,
|
t.addImageButton("icon-ban", 14 * 2,
|
||||||
() -> ui.showConfirm("$text.confirm", "$text.confirmban", () -> Call.onAdminRequest(player, AdminAction.ban))).padBottom(-5.1f);
|
() -> ui.showConfirm("$text.confirm", "$text.confirmban", () -> Call.onAdminRequest(player, AdminAction.ban)));
|
||||||
t.addImageButton("icon-cancel", 16 * 2,
|
t.addImageButton("icon-cancel", 16 * 2,
|
||||||
() -> ui.showConfirm("$text.confirm", "$text.confirmkick", () -> Call.onAdminRequest(player, AdminAction.kick))).padBottom(-5.1f);
|
() -> ui.showConfirm("$text.confirm", "$text.confirmkick", () -> Call.onAdminRequest(player, AdminAction.kick)));
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ package io.anuke.mindustry.world.blocks.storage;
|
|||||||
import io.anuke.mindustry.type.Item;
|
import io.anuke.mindustry.type.Item;
|
||||||
import io.anuke.mindustry.world.Block;
|
import io.anuke.mindustry.world.Block;
|
||||||
import io.anuke.mindustry.world.Tile;
|
import io.anuke.mindustry.world.Tile;
|
||||||
import io.anuke.mindustry.world.meta.BlockGroup;
|
|
||||||
|
|
||||||
public abstract class Unloader extends Block{
|
public abstract class Unloader extends Block{
|
||||||
protected final int timerUnload = timers++;
|
protected final int timerUnload = timers++;
|
||||||
@ -13,7 +12,6 @@ public abstract class Unloader extends Block{
|
|||||||
update = true;
|
update = true;
|
||||||
solid = true;
|
solid = true;
|
||||||
health = 70;
|
health = 70;
|
||||||
group = BlockGroup.transportation;
|
|
||||||
hasItems = true;
|
hasItems = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,6 +22,5 @@ public abstract class Unloader extends Block{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setBars(){
|
public void setBars(){}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user