mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 08:34:52 -07:00
Forward playerActions signals to playerEventHandler (#6126)
Took 54 minutes Took 7 seconds Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
9ca5ee52e7
commit
eecfe9d387
3 changed files with 15 additions and 10 deletions
|
|
@ -43,6 +43,20 @@ Player::Player(const ServerInfo_User &info, int _id, bool _local, bool _judge, A
|
|||
connect(this, &Player::activeChanged, graphicsItem, &PlayerGraphicsItem::onPlayerActiveChanged);
|
||||
|
||||
connect(this, &Player::openDeckEditor, game->getTab(), &TabGame::openDeckEditor);
|
||||
|
||||
forwardActionSignalsToEventHandler();
|
||||
}
|
||||
|
||||
// Event Handler is the controller i.e. everything hooks up to this to know about player state
|
||||
// Player should forward (private) signals to the event handler
|
||||
|
||||
void Player::forwardActionSignalsToEventHandler()
|
||||
{
|
||||
connect(playerActions, &PlayerActions::logSetTapped, playerEventHandler, &PlayerEventHandler::logSetTapped);
|
||||
connect(playerActions, &PlayerActions::logSetDoesntUntap, playerEventHandler,
|
||||
&PlayerEventHandler::logSetDoesntUntap);
|
||||
connect(playerActions, &PlayerActions::logSetAnnotation, playerEventHandler, &PlayerEventHandler::logSetAnnotation);
|
||||
connect(playerActions, &PlayerActions::logSetPT, playerEventHandler, &PlayerEventHandler::logSetPT);
|
||||
}
|
||||
|
||||
void Player::initializeZones()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue