From cc14e3cfc6dfad7bcabb1dadc8884a952b0d16e2 Mon Sep 17 00:00:00 2001 From: Jaeic Lee Date: Sun, 25 Jan 2015 11:34:51 +0900 Subject: [PATCH 1/4] Submenus for moving all cards in a zone to another --- cockatrice/src/player.cpp | 63 ++++++++++++++++++++++----------------- cockatrice/src/player.h | 2 +- 2 files changed, 37 insertions(+), 28 deletions(-) diff --git a/cockatrice/src/player.cpp b/cockatrice/src/player.cpp index e941ccfb..9020d0e6 100644 --- a/cockatrice/src/player.cpp +++ b/cockatrice/src/player.cpp @@ -245,14 +245,15 @@ Player::Player(const ServerInfo_User &info, int _id, bool _local, TabGame *_pare if (local) { handMenu = playerMenu->addMenu(QString()); - handMenu->addAction(aMulligan); - handMenu->addAction(aMoveHandToTopLibrary); - handMenu->addAction(aMoveHandToBottomLibrary); - handMenu->addAction(aMoveHandToGrave); - handMenu->addAction(aMoveHandToRfg); - handMenu->addSeparator(); playerLists.append(mRevealHand = handMenu->addMenu(QString())); playerLists.append(mRevealRandomHandCard = handMenu->addMenu(QString())); + handMenu->addSeparator(); + handMenu->addAction(aMulligan); + moveHandMenu = handMenu->addMenu(QString()); + moveHandMenu->addAction(aMoveHandToTopLibrary); + moveHandMenu->addAction(aMoveHandToBottomLibrary); + moveHandMenu->addAction(aMoveHandToGrave); + moveHandMenu->addAction(aMoveHandToRfg); hand->setMenu(handMenu); libraryMenu = playerMenu->addMenu(QString()); @@ -290,16 +291,18 @@ Player::Player(const ServerInfo_User &info, int _id, bool _local, TabGame *_pare if (local) { graveMenu->addSeparator(); - graveMenu->addAction(aMoveGraveToTopLibrary); - graveMenu->addAction(aMoveGraveToBottomLibrary); - graveMenu->addAction(aMoveGraveToHand); - graveMenu->addAction(aMoveGraveToRfg); + moveGraveMenu = graveMenu->addMenu(QString()); + moveGraveMenu->addAction(aMoveGraveToTopLibrary); + moveGraveMenu->addAction(aMoveGraveToBottomLibrary); + moveGraveMenu->addAction(aMoveGraveToHand); + moveGraveMenu->addAction(aMoveGraveToRfg); rfgMenu->addSeparator(); - rfgMenu->addAction(aMoveRfgToTopLibrary); - rfgMenu->addAction(aMoveRfgToBottomLibrary); - rfgMenu->addAction(aMoveRfgToHand); - rfgMenu->addAction(aMoveRfgToGrave); + moveRfgMenu = rfgMenu->addMenu(QString()); + moveRfgMenu->addAction(aMoveRfgToTopLibrary); + moveRfgMenu->addAction(aMoveRfgToBottomLibrary); + moveRfgMenu->addAction(aMoveRfgToHand); + moveRfgMenu->addAction(aMoveRfgToGrave); sbMenu = playerMenu->addMenu(QString()); sbMenu->addAction(aViewSideboard); @@ -585,18 +588,24 @@ void Player::retranslateUi() rfgMenu->setTitle(tr("&Exile")); if (local) { - aMoveHandToTopLibrary->setText(tr("Move to &top of library")); - aMoveHandToBottomLibrary->setText(tr("Move to &bottom of library")); - aMoveHandToGrave->setText(tr("Move to &graveyard")); - aMoveHandToRfg->setText(tr("Move to &exile")); - aMoveGraveToTopLibrary->setText(tr("Move to &top of library")); - aMoveGraveToBottomLibrary->setText(tr("Move to &bottom of library")); - aMoveGraveToHand->setText(tr("Move to &hand")); - aMoveGraveToRfg->setText(tr("Move to &exile")); - aMoveRfgToTopLibrary->setText(tr("Move to &top of library")); - aMoveRfgToBottomLibrary->setText(tr("Move to &bottom of library")); - aMoveRfgToHand->setText(tr("Move to &hand")); - aMoveRfgToGrave->setText(tr("Move to &graveyard")); + moveHandMenu->setTitle(tr("&Move hand to")); + aMoveHandToTopLibrary->setText(tr("&top of library")); + aMoveHandToBottomLibrary->setText(tr("&bottom of library")); + aMoveHandToGrave->setText(tr("&graveyard")); + aMoveHandToRfg->setText(tr("&exile")); + + moveGraveMenu->setTitle(tr("&Move graveyard to")); + aMoveGraveToTopLibrary->setText(tr("&top of library")); + aMoveGraveToBottomLibrary->setText(tr("&bottom of library")); + aMoveGraveToHand->setText(tr("&hand")); + aMoveGraveToRfg->setText(tr("&exile")); + + moveRfgMenu->setTitle(tr("&Move exile to")); + aMoveRfgToTopLibrary->setText(tr("&top of library")); + aMoveRfgToBottomLibrary->setText(tr("&bottom of library")); + aMoveRfgToHand->setText(tr("&hand")); + aMoveRfgToGrave->setText(tr("&graveyard")); + aViewLibrary->setText(tr("&View library")); aViewTopCards->setText(tr("View &top cards of library...")); mRevealLibrary->setTitle(tr("Reveal &library to")); @@ -615,7 +624,7 @@ void Player::retranslateUi() aMoveBottomCardToGrave->setText(tr("Put bottom card &in graveyard")); handMenu->setTitle(tr("&Hand")); - mRevealHand->setTitle(tr("&Reveal to")); + mRevealHand->setTitle(tr("&Reveal hand to")); mRevealRandomHandCard->setTitle(tr("Reveal r&andom card to")); sbMenu->setTitle(tr("&Sideboard")); libraryMenu->setTitle(tr("&Library")); diff --git a/cockatrice/src/player.h b/cockatrice/src/player.h index c5ea3ccc..76555bf8 100644 --- a/cockatrice/src/player.h +++ b/cockatrice/src/player.h @@ -159,7 +159,7 @@ private slots: private: TabGame *game; - QMenu *playerMenu, *handMenu, *graveMenu, *rfgMenu, *libraryMenu, *sbMenu, *countersMenu, *sayMenu, *createPredefinedTokenMenu, + QMenu *playerMenu, *handMenu, *moveHandMenu, *graveMenu, *moveGraveMenu, *rfgMenu, *moveRfgMenu, *libraryMenu, *sbMenu, *countersMenu, *sayMenu, *createPredefinedTokenMenu, *mRevealLibrary, *mRevealTopCard, *mRevealHand, *mRevealRandomHandCard; QList playerLists; QList allPlayersActions; From 46fb5f820e7620a904ded5499c1b9cbe872bf9d6 Mon Sep 17 00:00:00 2001 From: Jaeic Lee Date: Tue, 27 Jan 2015 03:14:52 +0900 Subject: [PATCH 2/4] Tweaked some texts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per Daenyth’s request --- cockatrice/src/player.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/cockatrice/src/player.cpp b/cockatrice/src/player.cpp index 9020d0e6..f1dbe672 100644 --- a/cockatrice/src/player.cpp +++ b/cockatrice/src/player.cpp @@ -588,23 +588,23 @@ void Player::retranslateUi() rfgMenu->setTitle(tr("&Exile")); if (local) { - moveHandMenu->setTitle(tr("&Move hand to")); - aMoveHandToTopLibrary->setText(tr("&top of library")); - aMoveHandToBottomLibrary->setText(tr("&bottom of library")); - aMoveHandToGrave->setText(tr("&graveyard")); - aMoveHandToRfg->setText(tr("&exile")); + moveHandMenu->setTitle(tr("&Move hand to...")); + aMoveHandToTopLibrary->setText(tr("&Top of library")); + aMoveHandToBottomLibrary->setText(tr("&Bottom of library")); + aMoveHandToGrave->setText(tr("&Graveyard")); + aMoveHandToRfg->setText(tr("&Exile")); - moveGraveMenu->setTitle(tr("&Move graveyard to")); - aMoveGraveToTopLibrary->setText(tr("&top of library")); - aMoveGraveToBottomLibrary->setText(tr("&bottom of library")); - aMoveGraveToHand->setText(tr("&hand")); - aMoveGraveToRfg->setText(tr("&exile")); + moveGraveMenu->setTitle(tr("&Move graveyard to...")); + aMoveGraveToTopLibrary->setText(tr("&Top of library")); + aMoveGraveToBottomLibrary->setText(tr("&Bottom of library")); + aMoveGraveToHand->setText(tr("&Hand")); + aMoveGraveToRfg->setText(tr("&Exile")); - moveRfgMenu->setTitle(tr("&Move exile to")); - aMoveRfgToTopLibrary->setText(tr("&top of library")); - aMoveRfgToBottomLibrary->setText(tr("&bottom of library")); - aMoveRfgToHand->setText(tr("&hand")); - aMoveRfgToGrave->setText(tr("&graveyard")); + moveRfgMenu->setTitle(tr("&Move exile to...")); + aMoveRfgToTopLibrary->setText(tr("&Top of library")); + aMoveRfgToBottomLibrary->setText(tr("&Bottom of library")); + aMoveRfgToHand->setText(tr("&Hand")); + aMoveRfgToGrave->setText(tr("&Graveyard")); aViewLibrary->setText(tr("&View library")); aViewTopCards->setText(tr("View &top cards of library...")); From c6800c48d2835f7e1879760f0b1f68454478d731 Mon Sep 17 00:00:00 2001 From: Jaeic Lee Date: Tue, 27 Jan 2015 03:32:58 +0900 Subject: [PATCH 3/4] More ellipsis Should be the last of them --- cockatrice/src/player.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cockatrice/src/player.cpp b/cockatrice/src/player.cpp index f1dbe672..a5dd7b2c 100644 --- a/cockatrice/src/player.cpp +++ b/cockatrice/src/player.cpp @@ -608,8 +608,8 @@ void Player::retranslateUi() aViewLibrary->setText(tr("&View library")); aViewTopCards->setText(tr("View &top cards of library...")); - mRevealLibrary->setTitle(tr("Reveal &library to")); - mRevealTopCard->setTitle(tr("Reveal t&op card to")); + 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")); @@ -624,8 +624,8 @@ void Player::retranslateUi() aMoveBottomCardToGrave->setText(tr("Put bottom card &in graveyard")); handMenu->setTitle(tr("&Hand")); - mRevealHand->setTitle(tr("&Reveal hand to")); - mRevealRandomHandCard->setTitle(tr("Reveal r&andom card to")); + mRevealHand->setTitle(tr("&Reveal hand to...")); + mRevealRandomHandCard->setTitle(tr("Reveal r&andom card to...")); sbMenu->setTitle(tr("&Sideboard")); libraryMenu->setTitle(tr("&Library")); countersMenu->setTitle(tr("&Counters")); From bfc1bd04b5c16743ba01ea9aee162f852873638c Mon Sep 17 00:00:00 2001 From: Jaeic Lee Date: Tue, 27 Jan 2015 09:54:11 +0900 Subject: [PATCH 4/4] Added separators Looks better imo. --- cockatrice/src/player.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cockatrice/src/player.cpp b/cockatrice/src/player.cpp index a5dd7b2c..024d2327 100644 --- a/cockatrice/src/player.cpp +++ b/cockatrice/src/player.cpp @@ -249,6 +249,7 @@ Player::Player(const ServerInfo_User &info, int _id, bool _local, TabGame *_pare playerLists.append(mRevealRandomHandCard = handMenu->addMenu(QString())); handMenu->addSeparator(); handMenu->addAction(aMulligan); + handMenu->addSeparator(); moveHandMenu = handMenu->addMenu(QString()); moveHandMenu->addAction(aMoveHandToTopLibrary); moveHandMenu->addAction(aMoveHandToBottomLibrary); @@ -269,12 +270,13 @@ 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); libraryMenu->addAction(aMoveTopCardToBottom); libraryMenu->addAction(aMoveBottomCardToGrave); + libraryMenu->addSeparator(); + libraryMenu->addAction(aOpenDeckInDeckEditor); deck->setMenu(libraryMenu, aDrawCard); } else { handMenu = 0;