mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-04 12:33:55 -07:00
reworked in-game avatar display
This commit is contained in:
parent
72223b3229
commit
02f2fb9764
15 changed files with 253 additions and 94 deletions
|
|
@ -2,14 +2,27 @@
|
|||
#define PLAYERTARGET_H
|
||||
|
||||
#include "arrowtarget.h"
|
||||
#include "abstractcounter.h"
|
||||
#include <QFont>
|
||||
#include <QPixmap>
|
||||
|
||||
class Player;
|
||||
|
||||
class PlayerCounter : public AbstractCounter {
|
||||
Q_OBJECT
|
||||
public:
|
||||
PlayerCounter(Player *_player, int _id, const QString &_name, int _value, QGraphicsItem *parent = 0);
|
||||
QRectF boundingRect() const;
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
};
|
||||
|
||||
class PlayerTarget : public ArrowTarget {
|
||||
Q_OBJECT
|
||||
private:
|
||||
QPixmap fullPixmap;
|
||||
PlayerCounter *playerCounter;
|
||||
public slots:
|
||||
void delCounter();
|
||||
public:
|
||||
enum { Type = typePlayerTarget };
|
||||
int type() const { return Type; }
|
||||
|
|
@ -17,6 +30,8 @@ public:
|
|||
PlayerTarget(Player *parent = 0);
|
||||
QRectF boundingRect() const;
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
|
||||
AbstractCounter *addCounter(int _counterId, const QString &_name, int _value);
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue