Show available shards and disable button if it is less than cost

This commit is contained in:
drdev
2015-12-13 18:24:26 +00:00
parent 99329f2d6d
commit 8774fcbf52

View File

@@ -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() {