mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 16:44:48 -07:00
deck editor is tab, replay viewer is tab, deck editor shown by default, cache window geometry between sessions, 'open this deck in deck editor' open in game
This commit is contained in:
parent
3edecf98c3
commit
cc516823d7
13 changed files with 518 additions and 309 deletions
|
|
@ -205,6 +205,9 @@ Player::Player(const ServerInfo_User &info, int _id, bool _local, TabGame *_pare
|
|||
aAlwaysRevealTopCard = new QAction(this);
|
||||
aAlwaysRevealTopCard->setCheckable(true);
|
||||
connect(aAlwaysRevealTopCard, SIGNAL(triggered()), this, SLOT(actAlwaysRevealTopCard()));
|
||||
aOpenDeckInDeckEditor = new QAction(this);
|
||||
aOpenDeckInDeckEditor->setEnabled(false);
|
||||
connect(aOpenDeckInDeckEditor, SIGNAL(triggered()), this, SLOT(actOpenDeckInDeckEditor()));
|
||||
}
|
||||
|
||||
aViewGraveyard = new QAction(this);
|
||||
|
|
@ -262,6 +265,7 @@ Player::Player(const ServerInfo_User &info, int _id, bool _local, TabGame *_pare
|
|||
playerLists.append(mRevealLibrary = libraryMenu->addMenu(QString()));
|
||||
playerLists.append(mRevealTopCard = libraryMenu->addMenu(QString()));
|
||||
libraryMenu->addAction(aAlwaysRevealTopCard);
|
||||
libraryMenu->addAction(aOpenDeckInDeckEditor);
|
||||
libraryMenu->addSeparator();
|
||||
libraryMenu->addAction(aMoveTopCardsToGrave);
|
||||
libraryMenu->addAction(aMoveTopCardsToExile);
|
||||
|
|
@ -595,6 +599,7 @@ void Player::retranslateUi()
|
|||
mRevealLibrary->setTitle(tr("Reveal &library to"));
|
||||
mRevealTopCard->setTitle(tr("Reveal t&op card to"));
|
||||
aAlwaysRevealTopCard->setText(tr("&Always reveal top card"));
|
||||
aOpenDeckInDeckEditor->setText(tr("O&pen deck in deck editor"));
|
||||
aViewSideboard->setText(tr("&View sideboard"));
|
||||
aDrawCard->setText(tr("&Draw card"));
|
||||
aDrawCards->setText(tr("D&raw cards..."));
|
||||
|
|
@ -744,6 +749,7 @@ void Player::initSayMenu()
|
|||
void Player::setDeck(DeckList *_deck)
|
||||
{
|
||||
deck = _deck;
|
||||
aOpenDeckInDeckEditor->setEnabled(deck);
|
||||
|
||||
createPredefinedTokenMenu->clear();
|
||||
predefinedTokens.clear();
|
||||
|
|
@ -783,6 +789,11 @@ void Player::actAlwaysRevealTopCard()
|
|||
sendGameCommand(cmd);
|
||||
}
|
||||
|
||||
void Player::actOpenDeckInDeckEditor()
|
||||
{
|
||||
emit openDeckEditor(new DeckList(deck));
|
||||
}
|
||||
|
||||
void Player::actViewGraveyard()
|
||||
{
|
||||
static_cast<GameScene *>(scene())->toggleZoneView(this, "grave", -1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue