Sending card name to chat on shift+click (#3106)

This commit is contained in:
Vafthrudnir 2018-02-13 08:50:37 +01:00 committed by Zach H
parent 8084ab605f
commit 11ad677fe8
5 changed files with 16 additions and 3 deletions

View file

@ -431,6 +431,12 @@ void TabGame::addMentionTag(QString value)
sayEdit->setFocus();
}
void TabGame::linkCardToChat(QString cardName)
{
sayEdit->insert("[[" + cardName + "]] ");
sayEdit->setFocus();
}
void TabGame::emitUserEvent()
{
bool globalEvent = !spectator || settingsCache->getSpectatorNotificationsEnabled();
@ -1224,6 +1230,7 @@ void TabGame::newCardAdded(AbstractCardItem *card)
connect(card, SIGNAL(showCardInfoPopup(QPoint, QString)), this, SLOT(showCardInfoPopup(QPoint, QString)));
connect(card, SIGNAL(deleteCardInfoPopup(QString)), this, SLOT(deleteCardInfoPopup(QString)));
connect(card, SIGNAL(updateCardMenu(AbstractCardItem *)), this, SLOT(updateCardMenu(AbstractCardItem *)));
connect(card, SIGNAL(cardShiftClicked(QString)), this, SLOT(linkCardToChat(QString)));
}
CardItem *TabGame::getCard(int playerId, const QString &zoneName, int cardId) const