More bugfixes
This commit is contained in:
@@ -89,7 +89,7 @@ public class MapsDialog extends FloatingDialog{
|
||||
TextButton button = maps.addButton("", "clear", () -> showMapInfo(map)).width(mapsize).pad(8).get();
|
||||
button.clearChildren();
|
||||
button.margin(9);
|
||||
button.add(map.meta.tags.get("name", map.name)).growX().center().get().setEllipsis(true);
|
||||
button.add(map.meta.tags.get("name", map.name)).width(mapsize - 18f).center().get().setEllipsis(true);
|
||||
button.row();
|
||||
button.addImage("white").growX().pad(4).color(Color.GRAY);
|
||||
button.row();
|
||||
|
||||
@@ -39,10 +39,15 @@ public class ZoneInfoDialog extends FloatingDialog{
|
||||
|
||||
Table iteminfo = new Table();
|
||||
Runnable rebuildItems = () -> {
|
||||
int i = 0;
|
||||
iteminfo.clear();
|
||||
ItemStack[] stacks = zone.unlocked() ? zone.getLaunchCost() : zone.itemRequirements;
|
||||
for(ItemStack stack : stacks){
|
||||
if(stack.amount == 0) continue;
|
||||
|
||||
if(i++ % 2 == 0){
|
||||
iteminfo.row();
|
||||
}
|
||||
iteminfo.addImage(stack.item.icon(Item.Icon.medium)).size(8*3).padRight(1);
|
||||
iteminfo.add(stack.amount + "").color(Color.LIGHT_GRAY).padRight(5);
|
||||
}
|
||||
@@ -157,7 +162,7 @@ public class ZoneInfoDialog extends FloatingDialog{
|
||||
dialog.cont.row();
|
||||
}
|
||||
dialog.show();
|
||||
}).colspan(4).size(100f, bsize).left();
|
||||
}).colspan(4).size(100f, bsize).left().disabled(b -> !content.items().contains(item -> data.getItem(item) > 0 && item.type == ItemType.material && !zone.getStartingItems().contains(stack -> stack.item == item)));
|
||||
};
|
||||
|
||||
rebuildLoadout[0].run();
|
||||
@@ -188,7 +193,7 @@ public class ZoneInfoDialog extends FloatingDialog{
|
||||
hide();
|
||||
world.playZone(zone);
|
||||
}
|
||||
}).size(300f, 70f).padTop(5).disabled(b -> zone.locked() ? !canUnlock(zone) : !data.hasItems(zone.getLaunchCost())).get();
|
||||
}).margin(13f).padTop(5).disabled(b -> zone.locked() ? !canUnlock(zone) : !data.hasItems(zone.getLaunchCost())).get();
|
||||
|
||||
button.row();
|
||||
button.add(iteminfo);
|
||||
|
||||
@@ -134,16 +134,21 @@ public class HudFragment extends Fragment{
|
||||
cont.row();
|
||||
|
||||
//fps display
|
||||
infolabel = cont.table(t -> {
|
||||
IntFormat fps = new IntFormat("fps");
|
||||
IntFormat ping = new IntFormat("ping");
|
||||
t.label(() -> fps.get(Core.graphics.getFramesPerSecond())).padRight(10);
|
||||
t.row();
|
||||
if(Net.hasClient()){
|
||||
t.label(() -> ping.get(Net.getPing())).visible(Net::client).colspan(2);
|
||||
}
|
||||
}).size(-1).visible(() -> Core.settings.getBool("fps")).update(t -> t.setTranslation(0,
|
||||
(!waves.isVisible() ? wavetable.getHeight() + healthTable.getHeight() : Math.min(wavetable.getTranslation().y + healthTable.getHeight(), wavetable.getHeight() + healthTable.getHeight())))).get();
|
||||
infolabel = new Table();
|
||||
IntFormat fps = new IntFormat("fps");
|
||||
IntFormat ping = new IntFormat("ping");
|
||||
infolabel.label(() -> fps.get(Core.graphics.getFramesPerSecond())).padRight(10);
|
||||
infolabel.row();
|
||||
if(Net.hasClient()){
|
||||
infolabel.label(() -> ping.get(Net.getPing())).visible(Net::client).colspan(2);
|
||||
}
|
||||
infolabel.visible(() -> Core.settings.getBool("fps")).update(() ->
|
||||
infolabel.setPosition(0,
|
||||
healthTable.isVisible() ? healthTable.getY() + healthTable.getTranslation().y : wavetable.isVisible() ? wavetable.getY() : 0f,
|
||||
Align.topLeft));
|
||||
|
||||
infolabel.pack();
|
||||
cont.addChild(infolabel);
|
||||
|
||||
//make wave box appear below rest of menu
|
||||
if(mobile){
|
||||
|
||||
Reference in New Issue
Block a user