Allow all overlays to face top human player if needed

Allow top human player to concede
This commit is contained in:
drdev
2014-09-30 18:23:42 +00:00
parent f8c2af1ad3
commit 89fd88ad1d
3 changed files with 23 additions and 35 deletions

View File

@@ -6,8 +6,6 @@ import forge.Graphics;
import forge.assets.FSkinColor;
import forge.assets.FSkinFont;
import forge.item.IPaperCard;
import forge.match.MatchUtil;
import forge.screens.match.MatchController;
import forge.toolbox.FList;
import forge.toolbox.FOverlay;
import forge.util.Utils;
@@ -23,13 +21,10 @@ public class CardZoom extends FOverlay {
public static <T> void show(final IPaperCard pc0) {
card = ViewUtil.getCardForUi(pc0);
cardZoom.setRotate180(false);
cardZoom.show();
}
public static <T> void show(final CardView card0) {
card = card0;
//rotate card zoom to face top human player if needed
cardZoom.setRotate180(MatchUtil.getGame() != null && MatchController.getView().isTopHumanPlayerActive());
cardZoom.show();
}

View File

@@ -10,6 +10,8 @@ import forge.Forge;
import forge.Graphics;
import forge.assets.FSkinColor;
import forge.assets.FSkinColor.Colors;
import forge.match.MatchUtil;
import forge.screens.match.MatchController;
public abstract class FOverlay extends FContainer {
public static final float ALPHA_COMPOSITE = 0.5f;
@@ -73,6 +75,8 @@ public abstract class FOverlay extends FContainer {
}
if (visible0) {
//rotate overlay to face top human player if needed
setRotate180(MatchUtil.getGame() != null && MatchController.getView().isTopHumanPlayerActive());
overlays.push(this);
}
else if (!hidingAll) { //hiding all handles cleaning up overlay collection