clicking to play can now play all selected (#5254)

* play action now applies to all selected cards

* check card zone before applying action

* fix bug with wonky play from deck

* refactor

* don't play card if it's already on table

* add new setting

* make actPlay and friends public

* implement thing

* refactor card_item
This commit is contained in:
RickyRister 2024-12-17 20:43:17 -08:00 committed by GitHub
parent fd5a649246
commit a6b5abf271
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 109 additions and 38 deletions

View file

@ -232,6 +232,7 @@ SettingsCache::SettingsCache()
spectatorNotificationsEnabled = settings->value("interface/specnotificationsenabled", false).toBool();
buddyConnectNotificationsEnabled = settings->value("interface/buddyconnectnotificationsenabled", true).toBool();
doubleClickToPlay = settings->value("interface/doubleclicktoplay", true).toBool();
clickPlaysAllSelected = settings->value("interface/clickPlaysAllSelected", true).toBool();
playToStack = settings->value("interface/playtostack", true).toBool();
startingHandSize = settings->value("interface/startinghandsize", 7).toInt();
annotateTokens = settings->value("interface/annotatetokens", false).toBool();
@ -490,6 +491,12 @@ void SettingsCache::setDoubleClickToPlay(QT_STATE_CHANGED_T _doubleClickToPlay)
settings->setValue("interface/doubleclicktoplay", doubleClickToPlay);
}
void SettingsCache::setClickPlaysAllSelected(QT_STATE_CHANGED_T _clickPlaysAllSelected)
{
clickPlaysAllSelected = static_cast<bool>(_clickPlaysAllSelected);
settings->setValue("interface/clickPlaysAllSelected", clickPlaysAllSelected);
}
void SettingsCache::setPlayToStack(QT_STATE_CHANGED_T _playToStack)
{
playToStack = static_cast<bool>(_playToStack);