[Refactor] Move attach and arrow previews from game logic into CardMenu

This commit is contained in:
Lukas Brübach 2026-10-06 12:47:44 +02:00 • committed by GitHub
parent e34166ae85
commit 86e08db9ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 28 additions and 30 deletions

View file

@ -1417,14 +1417,6 @@ void PlayerActions::actSetPT(QList<CardItem *> selectedCards, const QString &pt)
player->getGame()->getGameEventHandler()->sendGameCommand(prepareGameCommand(commandList), playerid);
}
void PlayerActions::actDrawArrow()
{
auto *card = player->getGame()->getActiveCard();
if (card) {
card->drawArrow(Qt::red);
}
}
void PlayerActions::actIncP(QList<CardItem *> selectedCards)
{
actIncPT(selectedCards, 1, 0);
@ -1516,16 +1508,6 @@ void PlayerActions::actSetAnnotation(QList<CardItem *> selectedCards, const QStr
sendGameCommand(prepareGameCommand(commandList));
}
void PlayerActions::actAttach()
{
auto *card = player->getGame()->getActiveCard();
if (!card) {
return;
}
card->drawAttachArrow();
}
void PlayerActions::actUnattach(QList<CardItem *> selectedCards)
{
QList<const ::google::protobuf::Message *> commandList;