1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-09-21 05:17:50 +03:00

make FPS/Ping and position untouchable (#2159)

This commit is contained in:
DeltaNedas 2020-06-13 01:32:19 +00:00 committed by GitHub
parent 27522ae494
commit e025f94200
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,6 +207,7 @@ public class HudFragment extends Fragment{
//fps display
cont.table(info -> {
info.touchable(Touchable.disabled);
info.top().left().margin(4).visible(() -> Core.settings.getBool("fps") && shown);
info.update(() -> info.setTranslation(state.rules.waves || state.isEditor() ? 0f : -Scl.scl(dsize * 4 + 3), 0));
IntFormat fps = new IntFormat("fps");
@ -217,7 +218,7 @@ public class HudFragment extends Fragment{
info.label(() -> ping.get(netClient.getPing())).visible(net::client).left().style(Styles.outlineLabel);
}).top().left();
});
parent.fill(t -> {
t.visible(() -> Core.settings.getBool("minimap") && !state.rules.tutorial && shown);
//minimap
@ -225,7 +226,8 @@ public class HudFragment extends Fragment{
t.row();
//position
t.label(() -> player.tileX() + "," + player.tileY())
.visible(() -> Core.settings.getBool("position") && !state.rules.tutorial);
.visible(() -> Core.settings.getBool("position") && !state.rules.tutorial)
.touchable(Touchable.disabled);
t.top().right();
});