GUI: improved GUI scale support (fixed font sizes in card icons popup, ability picker dialog, part of #969)

This commit is contained in:
Oleg Agafonov 2024-07-27 17:05:54 +04:00
parent 393dbc4047
commit ba929d5692
6 changed files with 19 additions and 14 deletions

View file

@ -97,17 +97,13 @@ public class PlayerView implements Serializable {
sideboard.put(card.getId(), new CardView(card, game, CardUtil.canShowAsControlled(card, createdForPlayerId)));
}
}
try {
for (Permanent permanent : state.getBattlefield().getAllPermanents()) {
if (showInBattlefield(permanent, state)) {
PermanentView view = new PermanentView(permanent, game.getCard(permanent.getId()), createdForPlayerId, game);
battlefield.put(view.getId(), view);
}
for (Permanent permanent : state.getBattlefield().getAllPermanents()) {
if (showInBattlefield(permanent, state)) {
PermanentView view = new PermanentView(permanent, game.getCard(permanent.getId()), createdForPlayerId, game);
battlefield.put(view.getId(), view);
}
} catch (ConcurrentModificationException e) {
// can happen as a player left battlefield while PlayerView is created
}
Card cardOnTop = (player.isTopCardRevealed() && player.getLibrary().hasCards())
? player.getLibrary().getFromTop(game) : null;
this.topCard = cardOnTop != null ? new CardView(cardOnTop, game) : null;