This commit is contained in:
@@ -22,9 +22,12 @@ public class LeaderboardRenderer {
|
||||
private final ImVec4 cellColorEnemy = new ImVec4(1.0f, 0.0f, 0.0f, 0.5f);
|
||||
private final int maxPlayersShowed = 2;
|
||||
|
||||
private final int emptyCellCount;
|
||||
|
||||
public LeaderboardRenderer(Game game, Player player) {
|
||||
this.game = game;
|
||||
this.currentPlayer = player;
|
||||
this.emptyCellCount = game.getDoku().getEmptyCells().size();
|
||||
}
|
||||
|
||||
private void renderRank(int rank) {
|
||||
@@ -48,7 +51,7 @@ public class LeaderboardRenderer {
|
||||
ImGui.sameLine();
|
||||
renderName(player.getPseudo());
|
||||
ImGui.sameLine();
|
||||
renderScore(player.getScore());
|
||||
renderScore(emptyCellCount - player.getRemainingCells());
|
||||
ImGui.endChild();
|
||||
ImGui.popStyleColor(3);
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@ public class MultiPlayerCompleteProgress {
|
||||
public void render() {
|
||||
Player firstPlayer = game.getLeaderboard().get(0);
|
||||
ImGui.setCursorPosX(ImGui.getIO().getDisplaySizeX() / 2.0f - progressSize.x / 2.0f);
|
||||
String progressText = firstPlayer.getPseudo() + " - " + firstPlayer.getScore() + "/" + emptyCellCount;
|
||||
this.progressBar.render(progressText, progressSize, 1.0f - firstPlayer.getScore() / (float) emptyCellCount);
|
||||
String progressText = firstPlayer.getPseudo() + " - " + (emptyCellCount - firstPlayer.getRemainingCells()) + "/" + emptyCellCount;
|
||||
this.progressBar.render(progressText, progressSize, 1.0f - firstPlayer.getRemainingCells() / (float) emptyCellCount);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user