mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 02:53:56 -07:00
[Game] Populate playerLists for menus in their aboutToShow … (#6214)
* Populate playerLists for menus in their aboutToShow so they are always current and do not rely on playerMenu manually tracking them. Also add playerActions for previous playerListActions. Took 1 hour 35 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
015570c833
commit
30e6b52783
10 changed files with 313 additions and 159 deletions
|
|
@ -33,19 +33,12 @@ public slots:
|
|||
void setMenusForGraphicItems();
|
||||
|
||||
private slots:
|
||||
void addPlayer(Player *playerToAdd);
|
||||
void removePlayer(Player *playerToRemove);
|
||||
void playerListActionTriggered();
|
||||
void onNewPlayerListActionCreated(QAction *action);
|
||||
void refreshShortcuts();
|
||||
|
||||
public:
|
||||
PlayerMenu(Player *player);
|
||||
void retranslateUi();
|
||||
|
||||
void addPlayerToList(QMenu *playerList, Player *playerToAdd);
|
||||
static void removePlayerFromList(QMenu *playerList, Player *player);
|
||||
|
||||
QMenu *updateCardMenu(const CardItem *card);
|
||||
|
||||
[[nodiscard]] QMenu *getPlayerMenu() const
|
||||
|
|
@ -88,8 +81,6 @@ private:
|
|||
UtilityMenu *utilityMenu;
|
||||
SayMenu *sayMenu;
|
||||
CustomZoneMenu *customZonesMenu;
|
||||
QList<QMenu *> playerLists;
|
||||
QList<QAction *> allPlayersActions;
|
||||
|
||||
bool shortcutsActive;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue