mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-07 05:53:59 -07:00
[Game] Move graphics out of game and into game_graphics (#6928)
Some checks are pending
Build Desktop / Configure (push) Waiting to run
Build Desktop / Debian 13 (push) Blocked by required conditions
Build Desktop / Debian 12 (push) Blocked by required conditions
Build Desktop / Fedora 44 (push) Blocked by required conditions
Build Desktop / Fedora 43 (push) Blocked by required conditions
Build Desktop / Servatrice_Debian 12 (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 (push) Blocked by required conditions
Build Desktop / Ubuntu 24.04 (push) Blocked by required conditions
Build Desktop / Arch (push) Blocked by required conditions
Build Desktop / macOS 14 (push) Blocked by required conditions
Build Desktop / macOS 15 (push) Blocked by required conditions
Build Desktop / macOS 13 Intel (push) Blocked by required conditions
Build Desktop / macOS 15 Debug (push) Blocked by required conditions
Build Desktop / Windows 10 (push) Blocked by required conditions
Build Docker Image / amd64 & arm64 (push) Waiting to run
Some checks are pending
Build Desktop / Configure (push) Waiting to run
Build Desktop / Debian 13 (push) Blocked by required conditions
Build Desktop / Debian 12 (push) Blocked by required conditions
Build Desktop / Fedora 44 (push) Blocked by required conditions
Build Desktop / Fedora 43 (push) Blocked by required conditions
Build Desktop / Servatrice_Debian 12 (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 (push) Blocked by required conditions
Build Desktop / Ubuntu 24.04 (push) Blocked by required conditions
Build Desktop / Arch (push) Blocked by required conditions
Build Desktop / macOS 14 (push) Blocked by required conditions
Build Desktop / macOS 15 (push) Blocked by required conditions
Build Desktop / macOS 13 Intel (push) Blocked by required conditions
Build Desktop / macOS 15 Debug (push) Blocked by required conditions
Build Desktop / Windows 10 (push) Blocked by required conditions
Build Docker Image / amd64 & arm64 (push) Waiting to run
* [Game][Player] Pull out graphics_items out of player_logic Took 25 seconds Took 9 minutes * [Game] Move graphics files into game_graphics Took 1 minute Took 2 minutes Took 23 seconds Took 1 minute Took 2 seconds * Include. Took 4 minutes Took 3 minutes Took 4 minutes Took 1 minute Took 3 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
cbfd286908
commit
da4ba222c0
116 changed files with 208 additions and 198 deletions
|
|
@ -1,118 +0,0 @@
|
|||
/**
|
||||
* @file library_menu.h
|
||||
* @ingroup GameMenusZones
|
||||
*/
|
||||
//! \todo Document this file.
|
||||
|
||||
#ifndef COCKATRICE_LIBRARY_MENU_H
|
||||
#define COCKATRICE_LIBRARY_MENU_H
|
||||
|
||||
#include "../../../interface/widgets/menus/tearoff_menu.h"
|
||||
#include "abstract_player_component.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QMenu>
|
||||
|
||||
class PlayerGraphicsItem;
|
||||
class PlayerLogic;
|
||||
class PlayerActions;
|
||||
|
||||
class LibraryMenu : public TearOffMenu, public AbstractPlayerComponent
|
||||
{
|
||||
Q_OBJECT
|
||||
public slots:
|
||||
void enableOpenInDeckEditorAction() const;
|
||||
void resetTopCardMenuActions();
|
||||
|
||||
public:
|
||||
LibraryMenu(PlayerGraphicsItem *player, QWidget *parent = nullptr);
|
||||
void createDrawActions();
|
||||
void createShuffleActions();
|
||||
void createMoveActions();
|
||||
void createViewActions();
|
||||
void retranslateUi() override;
|
||||
void populateRevealLibraryMenuWithActivePlayers();
|
||||
void populateLendLibraryMenuWithActivePlayers();
|
||||
void populateRevealTopCardMenuWithActivePlayers();
|
||||
void onRevealLibraryTriggered();
|
||||
void onLendLibraryTriggered();
|
||||
void onRevealTopCardTriggered();
|
||||
void setShortcutsActive() override;
|
||||
void setShortcutsInactive() override;
|
||||
|
||||
[[nodiscard]] bool isAlwaysRevealTopCardChecked() const
|
||||
{
|
||||
return aAlwaysRevealTopCard->isChecked();
|
||||
}
|
||||
|
||||
[[nodiscard]] bool isAlwaysLookAtTopCardChecked() const
|
||||
{
|
||||
return aAlwaysLookAtTopCard->isChecked();
|
||||
}
|
||||
|
||||
// expose useful actions/menus if PlayerMenu needs them
|
||||
[[nodiscard]] QMenu *revealLibrary() const
|
||||
{
|
||||
return mRevealLibrary;
|
||||
}
|
||||
[[nodiscard]] QMenu *lendLibraryMenu() const
|
||||
{
|
||||
return mLendLibrary;
|
||||
}
|
||||
[[nodiscard]] QMenu *revealTopCardMenu() const
|
||||
{
|
||||
return mRevealTopCard;
|
||||
}
|
||||
|
||||
QMenu *topLibraryMenu = nullptr;
|
||||
QMenu *bottomLibraryMenu = nullptr;
|
||||
|
||||
// Expose submenus that PlayerMenu tracks in its lists
|
||||
QMenu *mRevealLibrary = nullptr;
|
||||
QMenu *mLendLibrary = nullptr;
|
||||
QMenu *mRevealTopCard = nullptr;
|
||||
|
||||
QAction *aDrawCard = nullptr;
|
||||
QAction *aDrawCards = nullptr;
|
||||
QAction *aUndoDraw = nullptr;
|
||||
|
||||
QAction *aShuffle = nullptr;
|
||||
QAction *aViewLibrary = nullptr;
|
||||
QAction *aViewTopCards = nullptr;
|
||||
QAction *aViewBottomCards = nullptr;
|
||||
QAction *aAlwaysRevealTopCard = nullptr;
|
||||
QAction *aAlwaysLookAtTopCard = nullptr;
|
||||
QAction *aOpenDeckInDeckEditor = nullptr;
|
||||
|
||||
QAction *aMoveTopToPlay = nullptr;
|
||||
QAction *aMoveTopToPlayFaceDown = nullptr;
|
||||
QAction *aMoveTopCardToBottom = nullptr;
|
||||
QAction *aMoveTopCardToGraveyard = nullptr;
|
||||
QAction *aMoveTopCardToExile = nullptr;
|
||||
QAction *aMoveTopCardsToGraveyard = nullptr;
|
||||
QAction *aMoveTopCardsToGraveyardFaceDown = nullptr;
|
||||
QAction *aMoveTopCardsToExile = nullptr;
|
||||
QAction *aMoveTopCardsToExileFaceDown = nullptr;
|
||||
QAction *aMoveTopCardsUntil = nullptr;
|
||||
QAction *aShuffleTopCards = nullptr;
|
||||
|
||||
QAction *aDrawBottomCard = nullptr;
|
||||
QAction *aDrawBottomCards = nullptr;
|
||||
QAction *aMoveBottomToPlay = nullptr;
|
||||
QAction *aMoveBottomToPlayFaceDown = nullptr;
|
||||
QAction *aMoveBottomCardToTop = nullptr;
|
||||
QAction *aMoveBottomCardToGraveyard = nullptr;
|
||||
QAction *aMoveBottomCardToExile = nullptr;
|
||||
QAction *aMoveBottomCardsToGraveyard = nullptr;
|
||||
QAction *aMoveBottomCardsToGraveyardFaceDown = nullptr;
|
||||
QAction *aMoveBottomCardsToExile = nullptr;
|
||||
QAction *aMoveBottomCardsToExileFaceDown = nullptr;
|
||||
QAction *aShuffleBottomCards = nullptr;
|
||||
|
||||
int defaultNumberTopCards = 1;
|
||||
|
||||
private:
|
||||
PlayerGraphicsItem *player;
|
||||
};
|
||||
|
||||
#endif // COCKATRICE_LIBRARY_MENU_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue