mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
Show available shards and disable button if it is less than cost
This commit is contained in:
@@ -56,8 +56,9 @@ public class ConquestAEtherScreen extends FScreen {
|
|||||||
|
|
||||||
private void calculateShardCost() {
|
private void calculateShardCost() {
|
||||||
shardCost = FModel.getConquest().calculateShardCost(lstAEther.getFilteredItems(), lstAEther.getPool().countDistinct());
|
shardCost = FModel.getConquest().calculateShardCost(lstAEther.getFilteredItems(), lstAEther.getPool().countDistinct());
|
||||||
btnPull.setEnabled(shardCost > 0);
|
int availableShards = FModel.getConquest().getModel().getAEtherShards();
|
||||||
btnPull.setText(shardCost > 0 ? String.valueOf(shardCost) : "---");
|
btnPull.setEnabled(shardCost > 0 && shardCost <= availableShards);
|
||||||
|
btnPull.setText((shardCost > 0 ? String.valueOf(shardCost) : "---") + " / " + String.valueOf(availableShards));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void pullFromTheAEther() {
|
private void pullFromTheAEther() {
|
||||||
|
|||||||
Reference in New Issue
Block a user