mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 14:32:15 -07:00
Hook up tap logic again.
Took 13 minutes
This commit is contained in:
parent
8aef60b995
commit
052e5ff3c3
3 changed files with 4 additions and 2 deletions
|
|
@ -365,9 +365,9 @@ void CardItem::playCard(bool faceDown)
|
||||||
if (!owner->getPlayerInfo()->getLocalOrJudge())
|
if (!owner->getPlayerInfo()->getLocalOrJudge())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
TableZone *tz = qobject_cast<TableZone *>(zone);
|
TableZoneLogic *tz = qobject_cast<TableZoneLogic *>(zone);
|
||||||
if (tz)
|
if (tz)
|
||||||
tz->toggleTapped();
|
emit tz->toggleTapped();
|
||||||
else {
|
else {
|
||||||
if (SettingsCache::instance().getClickPlaysAllSelected()) {
|
if (SettingsCache::instance().getClickPlaysAllSelected()) {
|
||||||
faceDown ? zone->getPlayer()->getPlayerActions()->actPlayFacedown()
|
faceDown ? zone->getPlayer()->getPlayerActions()->actPlayFacedown()
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ class TableZoneLogic : public CardZoneLogic
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
signals:
|
signals:
|
||||||
void contentSizeChanged();
|
void contentSizeChanged();
|
||||||
|
void toggleTapped();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TableZoneLogic(Player *_player,
|
TableZoneLogic(Player *_player,
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ const QColor TableZone::GRADIENT_COLORLESS = QColor(255, 255, 255, 0);
|
||||||
TableZone::TableZone(TableZoneLogic *_logic, QGraphicsItem *parent) : SelectZone(_logic, parent), active(false)
|
TableZone::TableZone(TableZoneLogic *_logic, QGraphicsItem *parent) : SelectZone(_logic, parent), active(false)
|
||||||
{
|
{
|
||||||
connect(_logic, &TableZoneLogic::contentSizeChanged, this, &TableZone::resizeToContents);
|
connect(_logic, &TableZoneLogic::contentSizeChanged, this, &TableZone::resizeToContents);
|
||||||
|
connect(_logic, &TableZoneLogic::toggleTapped, this, &TableZone::toggleTapped);
|
||||||
connect(themeManager, &ThemeManager::themeChanged, this, &TableZone::updateBg);
|
connect(themeManager, &ThemeManager::themeChanged, this, &TableZone::updateBg);
|
||||||
connect(&SettingsCache::instance(), &SettingsCache::invertVerticalCoordinateChanged, this,
|
connect(&SettingsCache::instance(), &SettingsCache::invertVerticalCoordinateChanged, this,
|
||||||
&TableZone::reorganizeCards);
|
&TableZone::reorganizeCards);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue