Removed desktop top menu / Rebound pause back to space
This commit is contained in:
@@ -30,7 +30,7 @@ public class DefaultKeybinds{
|
||||
"zoom", new Axis(Input.SCROLL),
|
||||
"zoom_minimap", new Axis(Input.MINUS, Input.PLUS),
|
||||
"menu", Gdx.app.getType() == ApplicationType.Android ? Input.BACK : Input.ESCAPE,
|
||||
"pause", Input.Q,
|
||||
"pause", Input.SPACE,
|
||||
"toggle_menus", Input.C,
|
||||
new Category("multiplayer"),
|
||||
"player_list", Input.TAB,
|
||||
|
||||
@@ -54,6 +54,7 @@ public class HudFragment extends Fragment{
|
||||
|
||||
cont.top().left().visible(() -> !state.is(State.menu));
|
||||
|
||||
if(mobile){
|
||||
cont.table(select -> {
|
||||
select.left();
|
||||
select.defaults().size(dsize).left();
|
||||
@@ -61,12 +62,6 @@ public class HudFragment extends Fragment{
|
||||
menu = select.addImageButton("icon-menu", isize, ui.paused::show).get();
|
||||
flip = select.addImageButton("icon-arrow-up", isize, this::toggleMenus).get();
|
||||
|
||||
select.update(() -> {
|
||||
if(Inputs.keyTap("toggle_menus") && !ui.chatfrag.chatOpen()){
|
||||
toggleMenus();
|
||||
}
|
||||
});
|
||||
|
||||
select.addImageButton("icon-pause", isize, () -> {
|
||||
if(Net.active()){
|
||||
ui.listfrag.toggle();
|
||||
@@ -102,6 +97,13 @@ public class HudFragment extends Fragment{
|
||||
});
|
||||
|
||||
cont.row();
|
||||
}
|
||||
|
||||
cont.update(() -> {
|
||||
if(Inputs.keyTap("toggle_menus") && !ui.chatfrag.chatOpen()){
|
||||
toggleMenus();
|
||||
}
|
||||
});
|
||||
|
||||
Stack stack = new Stack();
|
||||
TextButton waves = new TextButton("");
|
||||
@@ -114,7 +116,7 @@ public class HudFragment extends Fragment{
|
||||
|
||||
addWaveTable(waves);
|
||||
addPlayButton(btable);
|
||||
cont.add(stack).fillX();
|
||||
cont.add(stack).width(dsize * 4);
|
||||
|
||||
cont.row();
|
||||
|
||||
@@ -132,7 +134,9 @@ public class HudFragment extends Fragment{
|
||||
}).size(-1).visible(() -> Settings.getBool("fps")).update(t -> t.setTranslation(0, (!waves.isVisible() ? wavetable.getHeight() : Math.min(wavetable.getTranslation().y, wavetable.getHeight())) )).get();
|
||||
|
||||
//make wave box appear below rest of menu
|
||||
if(mobile){
|
||||
cont.swapActor(wavetable, menu.getParent());
|
||||
}
|
||||
});
|
||||
|
||||
//minimap
|
||||
@@ -333,7 +337,9 @@ public class HudFragment extends Fragment{
|
||||
float dur = 0.3f;
|
||||
Interpolation in = Interpolation.pow3Out;
|
||||
|
||||
if(flip != null){
|
||||
flip.getStyle().imageUp = Core.skin.getDrawable(shown ? "icon-arrow-down" : "icon-arrow-up");
|
||||
}
|
||||
|
||||
if(shown){
|
||||
shown = false;
|
||||
|
||||
Reference in New Issue
Block a user