Add tooltip to player avatar with player details.

This commit is contained in:
elcnesh
2015-03-22 15:26:30 +00:00
parent b49a646e4f
commit 44cfbd5179
3 changed files with 93 additions and 11 deletions

View File

@@ -425,17 +425,19 @@ public final class CMatchUI
for (final Pair<PlayerView, ZoneType> kv : zonesToUpdate) {
final PlayerView owner = kv.getKey();
final ZoneType zt = kv.getValue();
final VField vf = getFieldViewFor(owner);
switch (zt) {
case Battlefield:
getFieldViewFor(owner).getTabletop().setupPlayZone();
vf.getTabletop().setupPlayZone();
break;
case Hand:
final VHand vHand = getHandFor(owner);
if (vHand != null) {
vHand.getLayoutControl().updateHand();
}
getFieldViewFor(owner).getDetailsPanel().updateZones();
vf.getDetailsPanel().updateZones();
vf.updateDetails();
FloatingCardArea.refresh(owner, zt);
break;
case Command:
@@ -445,7 +447,6 @@ public final class CMatchUI
cAntes.update();
break;
default:
final VField vf = getFieldViewFor(owner);
if (vf != null) {
vf.getDetailsPanel().updateZones();
}

View File

@@ -217,5 +217,6 @@ public class VField implements IVDoc<CField> {
boolean highlighted = isHighlighted();
this.avatarArea.setBorder(highlighted ? borderAvatarHighlighted : borderAvatarSimple );
this.avatarArea.setOpaque(highlighted);
this.avatarArea.setToolTipText(player.getDetailsHtml());
}
}