mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 08:22:15 -07:00
Rename folder.
Took 24 minutes Took 6 minutes
This commit is contained in:
parent
6c7871af5b
commit
33dfbdb50f
24 changed files with 83 additions and 50 deletions
46
cockatrice/src/game/player/menu/utility_menu.h
Normal file
46
cockatrice/src/game/player/menu/utility_menu.h
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
#ifndef COCKATRICE_UTILITY_MENU_H
|
||||
#define COCKATRICE_UTILITY_MENU_H
|
||||
|
||||
#include <QMenu>
|
||||
|
||||
class Player;
|
||||
class UtilityMenu : public QMenu
|
||||
{
|
||||
Q_OBJECT
|
||||
public slots:
|
||||
void populatePredefinedTokensMenu();
|
||||
void retranslateUi();
|
||||
void setShortcutsActive();
|
||||
void setShortcutsInactive();
|
||||
|
||||
public:
|
||||
explicit UtilityMenu(Player *player, QMenu *playerMenu);
|
||||
|
||||
[[nodiscard]] bool createAnotherTokenActionExists() const
|
||||
{
|
||||
return aCreateAnotherToken != nullptr;
|
||||
}
|
||||
|
||||
void setAndEnableCreateAnotherTokenAction(QString text)
|
||||
{
|
||||
aCreateAnotherToken->setText(text);
|
||||
aCreateAnotherToken->setEnabled(true);
|
||||
}
|
||||
|
||||
QStringList getPredefinedTokens() const
|
||||
{
|
||||
return predefinedTokens;
|
||||
}
|
||||
|
||||
private:
|
||||
Player *player;
|
||||
QStringList predefinedTokens;
|
||||
|
||||
QMenu *createPredefinedTokenMenu;
|
||||
|
||||
QAction *aIncrementAllCardCounters;
|
||||
QAction *aUntapAll, *aRollDie;
|
||||
QAction *aCreateToken, *aCreateAnotherToken;
|
||||
};
|
||||
|
||||
#endif // COCKATRICE_UTILITY_MENU_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue