Player list fixes with teams
This commit is contained in:
@@ -100,6 +100,8 @@ public class HudFragment extends Fragment{
|
||||
});
|
||||
|
||||
cont.row();
|
||||
cont.addImage("blank").height(6f).color(Palette.accent).fillX();
|
||||
cont.row();
|
||||
}
|
||||
|
||||
cont.update(() -> {
|
||||
@@ -345,7 +347,7 @@ public class HudFragment extends Fragment{
|
||||
if(shown){
|
||||
shown = false;
|
||||
blockfrag.toggle(dur, in);
|
||||
wavetable.actions(Actions.translateBy(0, (wavetable.getHeight() + dsize) - wavetable.getTranslation().y, dur, in));
|
||||
wavetable.actions(Actions.translateBy(0, (wavetable.getHeight() + dsize + 6) - wavetable.getTranslation().y, dur, in));
|
||||
infolabel.actions(Actions.translateBy(0, (wavetable.getHeight()) - wavetable.getTranslation().y, dur, in));
|
||||
}else{
|
||||
shown = true;
|
||||
|
||||
@@ -45,13 +45,13 @@ public class PlayerListFragment extends Fragment{
|
||||
}
|
||||
});
|
||||
|
||||
cont.table("clear", pane -> {
|
||||
cont.table("button", pane -> {
|
||||
pane.label(() -> Bundles.format(playerGroup.size() == 1 ? "text.players.single" : "text.players", playerGroup.size()));
|
||||
pane.row();
|
||||
pane.pane(content).grow().get().setScrollingDisabled(true, false);
|
||||
pane.row();
|
||||
|
||||
pane.table("pane", menu -> {
|
||||
pane.table(menu -> {
|
||||
menu.defaults().growX().height(50f).fillY();
|
||||
|
||||
menu.addButton("$text.server.bans", ui.bans::show).disabled(b -> Net.client());
|
||||
@@ -70,12 +70,14 @@ public class PlayerListFragment extends Fragment{
|
||||
|
||||
float h = 74f;
|
||||
|
||||
playerGroup.all().sort((p1, p2) -> p1.getTeam().compareTo(p2.getTeam()));
|
||||
|
||||
playerGroup.forEach(player -> {
|
||||
NetConnection connection = player.con;
|
||||
|
||||
if(connection == null && Net.server() && !player.isLocal) return;
|
||||
|
||||
Table button = new Table("button");
|
||||
Table button = new Table();
|
||||
button.left();
|
||||
button.margin(5).marginBottom(10);
|
||||
|
||||
@@ -133,12 +135,12 @@ public class PlayerListFragment extends Fragment{
|
||||
t.addImageButton("icon-zoom-small", 14 * 2, () -> ui.showError("Currently unimplemented.")/*Call.onAdminRequest(player, AdminAction.trace)*/);
|
||||
|
||||
}).padRight(12).padTop(-5).padLeft(0).padBottom(-10).size(bs + 10f, bs);
|
||||
|
||||
|
||||
}
|
||||
|
||||
content.add(button).padBottom(-6).width(350f).maxHeight(h + 14);
|
||||
content.row();
|
||||
content.addImage("blank").height(3f).color(state.mode.isPvp ? player.getTeam().color : Palette.accent).growX();
|
||||
content.row();
|
||||
});
|
||||
|
||||
content.marginBottom(5);
|
||||
|
||||
Reference in New Issue
Block a user