mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-27 08:24:39 -07:00
[Game] Playmats (#7101)
* [Game] Playmats Took 19 seconds Took 1 minute * [Playmats] Add fixed override and configurable fallbacks to settings. Took 29 minutes Took 43 seconds * Add main to test. Took 1 minute Took 29 seconds * Move settings to own group Took 11 minutes * Some attempts to refresh macOS compositor Took 2 minutes * Try something else Took 17 minutes * Don't manipulate live list Took 11 minutes * Change things about resolution, address comments. Took 45 minutes Took 12 minutes * Comments. Took 14 minutes Took 8 seconds * Re-order settings menu location Took 2 minutes * Rename PlaymatResolution to Info and add enums Took 8 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
74a454552a
commit
9eafd90a91
52 changed files with 1931 additions and 28 deletions
|
|
@ -11,6 +11,7 @@
|
|||
#include "../game_scene.h"
|
||||
|
||||
#include <QGraphicsObject>
|
||||
#include <libcockatrice/deck_list/deck_list.h>
|
||||
|
||||
class HandZone;
|
||||
class PileZone;
|
||||
|
|
@ -126,6 +127,7 @@ signals:
|
|||
void playerCountChanged();
|
||||
void mirroredChanged(bool isMirrored);
|
||||
void cardInfoRequested(const CardRef &cardRef);
|
||||
void playmatChanged(bool hasPlaymat);
|
||||
|
||||
private:
|
||||
PlayerLogic *player;
|
||||
|
|
@ -146,9 +148,23 @@ private:
|
|||
bool mirrored;
|
||||
bool handVisible = false;
|
||||
|
||||
QPixmap playmatPixmap;
|
||||
QPixmap scaledPlaymatPixmap; // down-scaled copy of playmatPixmap for the current render size
|
||||
QSize scaledPlaymatKey; // size bucket scaledPlaymatPixmap was rendered for
|
||||
PlaymatParams playmatParams;
|
||||
QString playmatAttribution;
|
||||
bool hasPlaymat = false;
|
||||
QMetaObject::Connection playmatPixmapConnection;
|
||||
|
||||
private slots:
|
||||
void updateBoundingRect();
|
||||
void rearrangeZones();
|
||||
void clearPlaymat();
|
||||
void updatePlaymat();
|
||||
void onPlaymatPixmapReady();
|
||||
|
||||
private:
|
||||
QPixmap scaledPlaymatFor(const QRectF &srcRect, const QSizeF &deviceDstSize);
|
||||
};
|
||||
|
||||
#endif // COCKATRICE_PLAYER_GRAPHICS_ITEM_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue