Timers (In progress)

This commit is contained in:
magenoxx 2013-06-19 17:12:31 +04:00
parent a373047c58
commit 42dd9d81b4
11 changed files with 302 additions and 58 deletions

View file

@ -182,6 +182,8 @@ public class PlayerPanelExt extends javax.swing.JPanel {
}
}
this.avatar.setText(player.getName());
String priorityTimeValue = getPriorityTimeLeftString(player);
this.avatar.setTopText(priorityTimeValue);
this.btnPlayer.setText(player.getName());
if (player.isActive()) {
this.avatar.setBorder(greenBorder);
@ -216,6 +218,11 @@ public class PlayerPanelExt extends javax.swing.JPanel {
update(player.getManaPool());
}
private String getPriorityTimeLeftString(PlayerView player) {
int priorityTimeLeft = player.getPriorityTimeLeft();
return priorityTimeLeft / 3600 + ":" + (priorityTimeLeft % 3600) / 60 + ":" + priorityTimeLeft % 60;
}
protected void update(ManaPoolView pool) {
manaLabels.get("B").setText(Integer.toString(pool.getBlack()));
manaLabels.get("R").setText(Integer.toString(pool.getRed()));