mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 20:11:59 -08:00
gui: fixed miss monarch and initiative info in player's name/avatar tooltip (#11424);
This commit is contained in:
parent
6e99a3653a
commit
a8ccbd4c63
1 changed files with 8 additions and 1 deletions
|
|
@ -395,9 +395,12 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
+ "<br/>Deck hash code: " + player.getDeckHashCode()
|
||||
+ "<br/>This match wins: " + player.getWins() + " of " + player.getWinsNeeded() + " (to win the match)";
|
||||
}
|
||||
// Extend tooltip
|
||||
|
||||
// extend tooltip
|
||||
StringBuilder tooltipText = new StringBuilder(basicTooltipText);
|
||||
tooltipText.append("<br/>Match time remaining: ").append(getPriorityTimeLeftString(player));
|
||||
|
||||
// designations
|
||||
this.avatar.setTopTextImageRight(null);
|
||||
for (String name : player.getDesignationNames()) {
|
||||
tooltipText.append("<br/>").append(name);
|
||||
|
|
@ -406,11 +409,15 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
|||
}
|
||||
}
|
||||
if (player.isMonarch()) {
|
||||
tooltipText.append("<br/>").append("The Monarch");
|
||||
this.avatar.setTopTextImageRight(ImageHelper.getImageFromResources("/info/crown.png"));
|
||||
}
|
||||
if (player.isInitiative()) {
|
||||
tooltipText.append("<br/>").append("Have the Initiative");
|
||||
this.avatar.setTopTextImageRight(ImageHelper.getImageFromResources("/info/initiative.png"));
|
||||
}
|
||||
|
||||
// counters
|
||||
for (Counter counter : player.getCounters().values()) {
|
||||
tooltipText.append("<br/>").append(counter.getName()).append(" counters: ").append(counter.getCount());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue