mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 11:03:25 -08:00
[Refactor] Move attach and arrow previews from game logic into CardMenu (#7414)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
52c5bd2ea3
commit
93c5d85996
8 changed files with 28 additions and 30 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue