mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 08:52:15 -07:00
move shuffle actions into existing menus
This commit is contained in:
parent
369d833eb1
commit
6b2c4e301b
3 changed files with 28 additions and 28 deletions
|
|
@ -249,10 +249,6 @@ Player::Player(const ServerInfo_User &info, int _id, bool _local, bool _judge, T
|
||||||
|
|
||||||
aShuffle = new QAction(this);
|
aShuffle = new QAction(this);
|
||||||
connect(aShuffle, &QAction::triggered, this, &Player::actShuffle);
|
connect(aShuffle, &QAction::triggered, this, &Player::actShuffle);
|
||||||
aShuffleTop = new QAction(this);
|
|
||||||
connect(aShuffleTop, &QAction::triggered, this, &Player::actShuffleTop);
|
|
||||||
aShuffleBottom = new QAction(this);
|
|
||||||
connect(aShuffleBottom, &QAction::triggered, this, &Player::actShuffleBottom);
|
|
||||||
|
|
||||||
aMulligan = new QAction(this);
|
aMulligan = new QAction(this);
|
||||||
connect(aMulligan, &QAction::triggered, this, &Player::actMulligan);
|
connect(aMulligan, &QAction::triggered, this, &Player::actMulligan);
|
||||||
|
|
@ -274,6 +270,9 @@ Player::Player(const ServerInfo_User &info, int _id, bool _local, bool _judge, T
|
||||||
aMoveTopCardToBottom = new QAction(this);
|
aMoveTopCardToBottom = new QAction(this);
|
||||||
connect(aMoveTopCardToBottom, &QAction::triggered, this, &Player::actMoveTopCardToBottom);
|
connect(aMoveTopCardToBottom, &QAction::triggered, this, &Player::actMoveTopCardToBottom);
|
||||||
|
|
||||||
|
aShuffleTopCards = new QAction(this);
|
||||||
|
connect(aShuffleTopCards, &QAction::triggered, this, &Player::actShuffleTop);
|
||||||
|
|
||||||
aDrawBottomCard = new QAction(this);
|
aDrawBottomCard = new QAction(this);
|
||||||
connect(aDrawBottomCard, &QAction::triggered, this, &Player::actDrawBottomCard);
|
connect(aDrawBottomCard, &QAction::triggered, this, &Player::actDrawBottomCard);
|
||||||
aDrawBottomCards = new QAction(this);
|
aDrawBottomCards = new QAction(this);
|
||||||
|
|
@ -292,6 +291,9 @@ Player::Player(const ServerInfo_User &info, int _id, bool _local, bool _judge, T
|
||||||
connect(aMoveBottomCardsToExile, &QAction::triggered, this, &Player::actMoveBottomCardsToExile);
|
connect(aMoveBottomCardsToExile, &QAction::triggered, this, &Player::actMoveBottomCardsToExile);
|
||||||
aMoveBottomCardToTop = new QAction(this);
|
aMoveBottomCardToTop = new QAction(this);
|
||||||
connect(aMoveBottomCardToTop, &QAction::triggered, this, &Player::actMoveBottomCardToTop);
|
connect(aMoveBottomCardToTop, &QAction::triggered, this, &Player::actMoveBottomCardToTop);
|
||||||
|
|
||||||
|
aShuffleBottomCards = new QAction(this);
|
||||||
|
connect(aShuffleBottomCards, &QAction::triggered, this, &Player::actShuffleBottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
playerMenu = new TearOffMenu();
|
playerMenu = new TearOffMenu();
|
||||||
|
|
@ -319,7 +321,7 @@ Player::Player(const ServerInfo_User &info, int _id, bool _local, bool _judge, T
|
||||||
libraryMenu->addAction(aDrawCards);
|
libraryMenu->addAction(aDrawCards);
|
||||||
libraryMenu->addAction(aUndoDraw);
|
libraryMenu->addAction(aUndoDraw);
|
||||||
libraryMenu->addSeparator();
|
libraryMenu->addSeparator();
|
||||||
shuffleMenu = libraryMenu->addTearOffMenu(QString());
|
libraryMenu->addAction(aShuffle);
|
||||||
libraryMenu->addSeparator();
|
libraryMenu->addSeparator();
|
||||||
libraryMenu->addAction(aViewLibrary);
|
libraryMenu->addAction(aViewLibrary);
|
||||||
libraryMenu->addAction(aViewTopCards);
|
libraryMenu->addAction(aViewTopCards);
|
||||||
|
|
@ -336,11 +338,6 @@ Player::Player(const ServerInfo_User &info, int _id, bool _local, bool _judge, T
|
||||||
libraryMenu->addSeparator();
|
libraryMenu->addSeparator();
|
||||||
libraryMenu->addAction(aOpenDeckInDeckEditor);
|
libraryMenu->addAction(aOpenDeckInDeckEditor);
|
||||||
_deck->setMenu(libraryMenu, aDrawCard);
|
_deck->setMenu(libraryMenu, aDrawCard);
|
||||||
|
|
||||||
shuffleMenu->addAction(aShuffle);
|
|
||||||
shuffleMenu->addAction(aShuffleTop);
|
|
||||||
shuffleMenu->addAction(aShuffleBottom);
|
|
||||||
|
|
||||||
topLibraryMenu->addAction(aMoveTopToPlay);
|
topLibraryMenu->addAction(aMoveTopToPlay);
|
||||||
topLibraryMenu->addAction(aMoveTopToPlayFaceDown);
|
topLibraryMenu->addAction(aMoveTopToPlayFaceDown);
|
||||||
topLibraryMenu->addAction(aMoveTopCardToBottom);
|
topLibraryMenu->addAction(aMoveTopCardToBottom);
|
||||||
|
|
@ -350,6 +347,8 @@ Player::Player(const ServerInfo_User &info, int _id, bool _local, bool _judge, T
|
||||||
topLibraryMenu->addAction(aMoveTopCardToExile);
|
topLibraryMenu->addAction(aMoveTopCardToExile);
|
||||||
topLibraryMenu->addAction(aMoveTopCardsToExile);
|
topLibraryMenu->addAction(aMoveTopCardsToExile);
|
||||||
topLibraryMenu->addAction(aMoveTopCardsUntil);
|
topLibraryMenu->addAction(aMoveTopCardsUntil);
|
||||||
|
topLibraryMenu->addSeparator();
|
||||||
|
topLibraryMenu->addAction(aShuffleTopCards);
|
||||||
|
|
||||||
bottomLibraryMenu->addAction(aDrawBottomCard);
|
bottomLibraryMenu->addAction(aDrawBottomCard);
|
||||||
bottomLibraryMenu->addAction(aDrawBottomCards);
|
bottomLibraryMenu->addAction(aDrawBottomCards);
|
||||||
|
|
@ -362,6 +361,8 @@ Player::Player(const ServerInfo_User &info, int _id, bool _local, bool _judge, T
|
||||||
bottomLibraryMenu->addAction(aMoveBottomCardsToGraveyard);
|
bottomLibraryMenu->addAction(aMoveBottomCardsToGraveyard);
|
||||||
bottomLibraryMenu->addAction(aMoveBottomCardToExile);
|
bottomLibraryMenu->addAction(aMoveBottomCardToExile);
|
||||||
bottomLibraryMenu->addAction(aMoveBottomCardsToExile);
|
bottomLibraryMenu->addAction(aMoveBottomCardsToExile);
|
||||||
|
bottomLibraryMenu->addSeparator();
|
||||||
|
bottomLibraryMenu->addAction(aShuffleBottomCards);
|
||||||
}
|
}
|
||||||
|
|
||||||
graveMenu = playerMenu->addTearOffMenu(QString());
|
graveMenu = playerMenu->addTearOffMenu(QString());
|
||||||
|
|
@ -803,10 +804,7 @@ void Player::retranslateUi()
|
||||||
aUndoDraw->setText(tr("&Undo last draw"));
|
aUndoDraw->setText(tr("&Undo last draw"));
|
||||||
aMulligan->setText(tr("Take &mulligan"));
|
aMulligan->setText(tr("Take &mulligan"));
|
||||||
|
|
||||||
shuffleMenu->setTitle(tr("Shuffle..."));
|
aShuffle->setText(tr("Shuffle"));
|
||||||
aShuffle->setText(tr("Entire library"));
|
|
||||||
aShuffleTop->setText(tr("Top cards of library..."));
|
|
||||||
aShuffleBottom->setText(tr("Bottom cards of library..."));
|
|
||||||
|
|
||||||
aMoveTopToPlay->setText(tr("&Play top card"));
|
aMoveTopToPlay->setText(tr("&Play top card"));
|
||||||
aMoveTopToPlayFaceDown->setText(tr("Play top card &face down"));
|
aMoveTopToPlayFaceDown->setText(tr("Play top card &face down"));
|
||||||
|
|
@ -816,6 +814,7 @@ void Player::retranslateUi()
|
||||||
aMoveTopCardsToGraveyard->setText(tr("Move top cards to &graveyard..."));
|
aMoveTopCardsToGraveyard->setText(tr("Move top cards to &graveyard..."));
|
||||||
aMoveTopCardsToExile->setText(tr("Move top cards to &exile..."));
|
aMoveTopCardsToExile->setText(tr("Move top cards to &exile..."));
|
||||||
aMoveTopCardsUntil->setText(tr("Put top cards on stack &until..."));
|
aMoveTopCardsUntil->setText(tr("Put top cards on stack &until..."));
|
||||||
|
aShuffleTopCards->setText(tr("Shuffle top cards..."));
|
||||||
|
|
||||||
aDrawBottomCard->setText(tr("&Draw bottom card"));
|
aDrawBottomCard->setText(tr("&Draw bottom card"));
|
||||||
aDrawBottomCards->setText(tr("D&raw bottom cards..."));
|
aDrawBottomCards->setText(tr("D&raw bottom cards..."));
|
||||||
|
|
@ -826,6 +825,7 @@ void Player::retranslateUi()
|
||||||
aMoveBottomCardsToGraveyard->setText(tr("Move bottom cards to &graveyard..."));
|
aMoveBottomCardsToGraveyard->setText(tr("Move bottom cards to &graveyard..."));
|
||||||
aMoveBottomCardsToExile->setText(tr("Move bottom cards to &exile..."));
|
aMoveBottomCardsToExile->setText(tr("Move bottom cards to &exile..."));
|
||||||
aMoveBottomCardToTop->setText(tr("Put bottom card on &top"));
|
aMoveBottomCardToTop->setText(tr("Put bottom card on &top"));
|
||||||
|
aShuffleBottomCards->setText(tr("Shuffle bottom cards..."));
|
||||||
|
|
||||||
handMenu->setTitle(tr("&Hand"));
|
handMenu->setTitle(tr("&Hand"));
|
||||||
mRevealHand->setTitle(tr("&Reveal hand to..."));
|
mRevealHand->setTitle(tr("&Reveal hand to..."));
|
||||||
|
|
@ -993,8 +993,8 @@ void Player::setShortcutsActive()
|
||||||
aUndoDraw->setShortcut(shortcuts.getSingleShortcut("Player/aUndoDraw"));
|
aUndoDraw->setShortcut(shortcuts.getSingleShortcut("Player/aUndoDraw"));
|
||||||
aMulligan->setShortcut(shortcuts.getSingleShortcut("Player/aMulligan"));
|
aMulligan->setShortcut(shortcuts.getSingleShortcut("Player/aMulligan"));
|
||||||
aShuffle->setShortcut(shortcuts.getSingleShortcut("Player/aShuffle"));
|
aShuffle->setShortcut(shortcuts.getSingleShortcut("Player/aShuffle"));
|
||||||
aShuffleTop->setShortcut(shortcuts.getSingleShortcut("Player/aShuffleTop"));
|
aShuffleTopCards->setShortcut(shortcuts.getSingleShortcut("Player/aShuffleTopCards"));
|
||||||
aShuffleBottom->setShortcut(shortcuts.getSingleShortcut("Player/aShuffleBottom"));
|
aShuffleBottomCards->setShortcut(shortcuts.getSingleShortcut("Player/aShuffleBottomCards"));
|
||||||
aUntapAll->setShortcut(shortcuts.getSingleShortcut("Player/aUntapAll"));
|
aUntapAll->setShortcut(shortcuts.getSingleShortcut("Player/aUntapAll"));
|
||||||
aRollDie->setShortcut(shortcuts.getSingleShortcut("Player/aRollDie"));
|
aRollDie->setShortcut(shortcuts.getSingleShortcut("Player/aRollDie"));
|
||||||
aCreateToken->setShortcut(shortcuts.getSingleShortcut("Player/aCreateToken"));
|
aCreateToken->setShortcut(shortcuts.getSingleShortcut("Player/aCreateToken"));
|
||||||
|
|
@ -1045,8 +1045,8 @@ void Player::setShortcutsInactive()
|
||||||
aUndoDraw->setShortcut(QKeySequence());
|
aUndoDraw->setShortcut(QKeySequence());
|
||||||
aMulligan->setShortcut(QKeySequence());
|
aMulligan->setShortcut(QKeySequence());
|
||||||
aShuffle->setShortcut(QKeySequence());
|
aShuffle->setShortcut(QKeySequence());
|
||||||
aShuffleTop->setShortcut(QKeySequence());
|
aShuffleTopCards->setShortcut(QKeySequence());
|
||||||
aShuffleBottom->setShortcut(QKeySequence());
|
aShuffleBottomCards->setShortcut(QKeySequence());
|
||||||
aUntapAll->setShortcut(QKeySequence());
|
aUntapAll->setShortcut(QKeySequence());
|
||||||
aRollDie->setShortcut(QKeySequence());
|
aRollDie->setShortcut(QKeySequence());
|
||||||
aCreateToken->setShortcut(QKeySequence());
|
aCreateToken->setShortcut(QKeySequence());
|
||||||
|
|
|
||||||
|
|
@ -253,8 +253,8 @@ private:
|
||||||
TabGame *game;
|
TabGame *game;
|
||||||
QMenu *sbMenu, *countersMenu, *sayMenu, *createPredefinedTokenMenu, *mRevealLibrary, *mLendLibrary, *mRevealTopCard,
|
QMenu *sbMenu, *countersMenu, *sayMenu, *createPredefinedTokenMenu, *mRevealLibrary, *mLendLibrary, *mRevealTopCard,
|
||||||
*mRevealHand, *mRevealRandomHandCard, *mRevealRandomGraveyardCard;
|
*mRevealHand, *mRevealRandomHandCard, *mRevealRandomGraveyardCard;
|
||||||
TearOffMenu *moveGraveMenu, *moveRfgMenu, *graveMenu, *moveHandMenu, *handMenu, *libraryMenu, *shuffleMenu,
|
TearOffMenu *moveGraveMenu, *moveRfgMenu, *graveMenu, *moveHandMenu, *handMenu, *libraryMenu, *topLibraryMenu,
|
||||||
*topLibraryMenu, *bottomLibraryMenu, *rfgMenu, *playerMenu;
|
*bottomLibraryMenu, *rfgMenu, *playerMenu;
|
||||||
QList<QMenu *> playerLists;
|
QList<QMenu *> playerLists;
|
||||||
QList<QMenu *> singlePlayerLists;
|
QList<QMenu *> singlePlayerLists;
|
||||||
QList<QAction *> allPlayersActions;
|
QList<QAction *> allPlayersActions;
|
||||||
|
|
@ -265,7 +265,7 @@ private:
|
||||||
*aViewBottomCards, *aAlwaysRevealTopCard, *aAlwaysLookAtTopCard, *aOpenDeckInDeckEditor,
|
*aViewBottomCards, *aAlwaysRevealTopCard, *aAlwaysLookAtTopCard, *aOpenDeckInDeckEditor,
|
||||||
*aMoveTopCardToGraveyard, *aMoveTopCardToExile, *aMoveTopCardsToGraveyard, *aMoveTopCardsToExile,
|
*aMoveTopCardToGraveyard, *aMoveTopCardToExile, *aMoveTopCardsToGraveyard, *aMoveTopCardsToExile,
|
||||||
*aMoveTopCardsUntil, *aMoveTopCardToBottom, *aViewGraveyard, *aViewRfg, *aViewSideboard, *aDrawCard,
|
*aMoveTopCardsUntil, *aMoveTopCardToBottom, *aViewGraveyard, *aViewRfg, *aViewSideboard, *aDrawCard,
|
||||||
*aDrawCards, *aUndoDraw, *aMulligan, *aShuffle, *aShuffleTop, *aShuffleBottom, *aMoveTopToPlay,
|
*aDrawCards, *aUndoDraw, *aMulligan, *aShuffle, *aShuffleTopCards, *aShuffleBottomCards, *aMoveTopToPlay,
|
||||||
*aMoveTopToPlayFaceDown, *aUntapAll, *aRollDie, *aCreateToken, *aCreateAnotherToken, *aMoveBottomToPlay,
|
*aMoveTopToPlayFaceDown, *aUntapAll, *aRollDie, *aCreateToken, *aCreateAnotherToken, *aMoveBottomToPlay,
|
||||||
*aMoveBottomToPlayFaceDown, *aMoveBottomCardToTop, *aMoveBottomCardToGraveyard, *aMoveBottomCardToExile,
|
*aMoveBottomToPlayFaceDown, *aMoveBottomCardToTop, *aMoveBottomCardToGraveyard, *aMoveBottomCardToExile,
|
||||||
*aMoveBottomCardsToGraveyard, *aMoveBottomCardsToExile, *aDrawBottomCard, *aDrawBottomCards;
|
*aMoveBottomCardsToGraveyard, *aMoveBottomCardsToExile, *aDrawBottomCard, *aDrawBottomCards;
|
||||||
|
|
|
||||||
|
|
@ -575,13 +575,13 @@ private:
|
||||||
{"Player/aRollDie", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Roll Dice..."),
|
{"Player/aRollDie", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Roll Dice..."),
|
||||||
parseSequenceString("Ctrl+I"),
|
parseSequenceString("Ctrl+I"),
|
||||||
ShortcutGroup::Gameplay)},
|
ShortcutGroup::Gameplay)},
|
||||||
{"Player/aShuffle", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Shuffle Entire Library"),
|
{"Player/aShuffle", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Shuffle Library"),
|
||||||
parseSequenceString("Ctrl+S"),
|
parseSequenceString("Ctrl+S"),
|
||||||
ShortcutGroup::Gameplay)},
|
ShortcutGroup::Gameplay)},
|
||||||
{"Player/aShuffleTop", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Shuffle Top Cards of Library"),
|
{"Player/aShuffleTopCards", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Shuffle Top Cards of Library"),
|
||||||
parseSequenceString(""),
|
parseSequenceString(""),
|
||||||
ShortcutGroup::Gameplay)},
|
ShortcutGroup::Gameplay)},
|
||||||
{"Player/aShuffleBottom", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Shuffle Bottom Cards of Library"),
|
{"Player/aShuffleBottomCards", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Shuffle Bottom Cards of Library"),
|
||||||
parseSequenceString(""),
|
parseSequenceString(""),
|
||||||
ShortcutGroup::Gameplay)},
|
ShortcutGroup::Gameplay)},
|
||||||
{"Player/aMulligan", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Mulligan"),
|
{"Player/aMulligan", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Mulligan"),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue