From 8774fcbf525a61ffc85f6b09e9013f3bb0b3d2e1 Mon Sep 17 00:00:00 2001 From: drdev Date: Sun, 13 Dec 2015 18:24:26 +0000 Subject: [PATCH] Show available shards and disable button if it is less than cost --- .../forge/screens/planarconquest/ConquestAEtherScreen.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/forge-gui-mobile/src/forge/screens/planarconquest/ConquestAEtherScreen.java b/forge-gui-mobile/src/forge/screens/planarconquest/ConquestAEtherScreen.java index b7350f63f27..aaf93a3a623 100644 --- a/forge-gui-mobile/src/forge/screens/planarconquest/ConquestAEtherScreen.java +++ b/forge-gui-mobile/src/forge/screens/planarconquest/ConquestAEtherScreen.java @@ -56,8 +56,9 @@ public class ConquestAEtherScreen extends FScreen { private void calculateShardCost() { shardCost = FModel.getConquest().calculateShardCost(lstAEther.getFilteredItems(), lstAEther.getPool().countDistinct()); - btnPull.setEnabled(shardCost > 0); - btnPull.setText(shardCost > 0 ? String.valueOf(shardCost) : "---"); + int availableShards = FModel.getConquest().getModel().getAEtherShards(); + btnPull.setEnabled(shardCost > 0 && shardCost <= availableShards); + btnPull.setText((shardCost > 0 ? String.valueOf(shardCost) : "---") + " / " + String.valueOf(availableShards)); } private void pullFromTheAEther() {