Added deck size limit
Updated to use the current deck size limit
This commit is contained in:
parent
59c0834427
commit
45d214aa19
1 changed files with 2 additions and 1 deletions
|
@ -515,6 +515,7 @@ void Player::playerListActionTriggered()
|
||||||
if (menu == mRevealLibrary) {
|
if (menu == mRevealLibrary) {
|
||||||
cmd.set_zone_name("deck");
|
cmd.set_zone_name("deck");
|
||||||
} else if (menu == mRevealTopCard) {
|
} else if (menu == mRevealTopCard) {
|
||||||
|
int decksize = zones.value("deck")->getCards().size();
|
||||||
bool ok;
|
bool ok;
|
||||||
int number =
|
int number =
|
||||||
#if QT_VERSION < 0x050000
|
#if QT_VERSION < 0x050000
|
||||||
|
@ -522,7 +523,7 @@ void Player::playerListActionTriggered()
|
||||||
#else
|
#else
|
||||||
QInputDialog::getInt(
|
QInputDialog::getInt(
|
||||||
#endif
|
#endif
|
||||||
0, tr("Reveal top cards of library"), tr("Number of cards:"), defaultNumberTopCards, 1, 2000000000, 1, &ok);
|
0, tr("Reveal top cards of library"), tr("Number of cards: (max %1)").arg(decksize), defaultNumberTopCards, 1, decksize, 1, &ok);
|
||||||
if (ok) {
|
if (ok) {
|
||||||
cmd.set_zone_name("deck");
|
cmd.set_zone_name("deck");
|
||||||
cmd.set_top_cards(number);
|
cmd.set_top_cards(number);
|
||||||
|
|
Loading…
Reference in a new issue