From 222105be610bf27a9eba5979a0b809439eff515b Mon Sep 17 00:00:00 2001 From: Matt Lowe Date: Mon, 19 Jan 2015 21:29:15 +0100 Subject: [PATCH] Added functionality in game --- cockatrice/src/tab_game.cpp | 6 ++++++ cockatrice/src/tab_game.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/cockatrice/src/tab_game.cpp b/cockatrice/src/tab_game.cpp index 4144409c..aefcf02e 100644 --- a/cockatrice/src/tab_game.cpp +++ b/cockatrice/src/tab_game.cpp @@ -418,6 +418,7 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, QList &_client connect(messageLog, SIGNAL(cardNameHovered(QString)), cardInfo, SLOT(setCard(QString))); connect(messageLog, SIGNAL(showCardInfoPopup(QPoint, QString)), this, SLOT(showCardInfoPopup(QPoint, QString))); connect(messageLog, SIGNAL(deleteCardInfoPopup(QString)), this, SLOT(deleteCardInfoPopup(QString))); + connect(messageLog, SIGNAL(addMentionTag(QString)), this, SLOT(addMentionTag(QString))); sayLabel = new QLabel; sayEdit = new QLineEdit; sayLabel->setBuddy(sayEdit); @@ -507,6 +508,11 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, QList &_client messageLog->logGameJoined(gameInfo.game_id()); } +void TabGame::addMentionTag(QString value) { + sayEdit->insert(value + " "); + sayEdit->setFocus(); +} + TabGame::~TabGame() { delete replay; diff --git a/cockatrice/src/tab_game.h b/cockatrice/src/tab_game.h index 50f77e1a..0725f373 100644 --- a/cockatrice/src/tab_game.h +++ b/cockatrice/src/tab_game.h @@ -195,6 +195,8 @@ private slots: void actPhaseAction(); void actNextPhase(); void actNextTurn(); + + void addMentionTag(QString value); public: TabGame(TabSupervisor *_tabSupervisor, QList &_clients, const Event_GameJoined &event, const QMap &_roomGameTypes); TabGame(TabSupervisor *_tabSupervisor, GameReplay *replay);