forked from External/mage
Timers (In progress)
This commit is contained in:
parent
a373047c58
commit
42dd9d81b4
11 changed files with 302 additions and 58 deletions
|
|
@ -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()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue