mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Initial commit for sideboarding. It's supposed to be fully functional.
This commit is contained in:
parent
2ee4bb834d
commit
b2f83541e7
18 changed files with 474 additions and 87 deletions
|
|
@ -40,6 +40,7 @@ TabGame::TabGame(Client *_client, int _gameId, const QString &_gameDescription,
|
|||
buttonHBox->addStretch();
|
||||
deckView = new DeckView;
|
||||
connect(deckView, SIGNAL(newCardAdded(AbstractCardItem *)), this, SLOT(newCardAdded(AbstractCardItem *)));
|
||||
connect(deckView, SIGNAL(sideboardPlanChanged()), this, SLOT(sideboardPlanChanged()));
|
||||
QVBoxLayout *deckViewLayout = new QVBoxLayout;
|
||||
deckViewLayout->addLayout(buttonHBox);
|
||||
deckViewLayout->addWidget(deckView);
|
||||
|
|
@ -490,3 +491,9 @@ void TabGame::newCardAdded(AbstractCardItem *card)
|
|||
{
|
||||
connect(card, SIGNAL(hovered(AbstractCardItem *)), cardInfo, SLOT(setCard(AbstractCardItem *)));
|
||||
}
|
||||
|
||||
void TabGame::sideboardPlanChanged()
|
||||
{
|
||||
QList<MoveCardToZone *> newPlan = deckView->getSideboardPlan();
|
||||
client->sendCommand(new Command_SetSideboardPlan(gameId, newPlan));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue