mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
avatar changes
This commit is contained in:
parent
28a77f10e4
commit
2f422f5a20
6 changed files with 29 additions and 19 deletions
|
|
@ -20,8 +20,8 @@
|
|||
#include <QMenu>
|
||||
#include <QDebug>
|
||||
|
||||
Player::Player(const QString &_name, int _id, bool _local, TabGame *_parent)
|
||||
: QObject(_parent), shortcutsActive(false), defaultNumberTopCards(3), lastTokenDestroy(true), name(_name), id(_id), active(false), local(_local), mirrored(false), dialogSemaphore(false)
|
||||
Player::Player(ServerInfo_User *info, int _id, bool _local, TabGame *_parent)
|
||||
: QObject(_parent), shortcutsActive(false), defaultNumberTopCards(3), lastTokenDestroy(true), userInfo(new ServerInfo_User(info)), id(_id), active(false), local(_local), mirrored(false), dialogSemaphore(false)
|
||||
{
|
||||
setCacheMode(DeviceCoordinateCache);
|
||||
|
||||
|
|
@ -29,7 +29,8 @@ Player::Player(const QString &_name, int _id, bool _local, TabGame *_parent)
|
|||
connect(settingsCache, SIGNAL(playerBgPathChanged()), this, SLOT(updateBgPixmap()));
|
||||
updateBgPixmap();
|
||||
|
||||
playerTarget = new PlayerTarget(name, CARD_WIDTH + counterAreaWidth + 5, this);
|
||||
// playerTarget = new PlayerTarget(CARD_WIDTH + counterAreaWidth + 5, this);
|
||||
playerTarget = new PlayerTarget(this);
|
||||
playerTarget->setPos(QPointF(0, 0));
|
||||
|
||||
QPointF base = QPointF(counterAreaWidth, 50);
|
||||
|
|
@ -239,6 +240,7 @@ Player::~Player()
|
|||
|
||||
clearCounters();
|
||||
delete playerMenu;
|
||||
delete userInfo;
|
||||
}
|
||||
|
||||
void Player::rearrangeZones()
|
||||
|
|
@ -289,7 +291,7 @@ void Player::retranslateUi()
|
|||
{
|
||||
aViewGraveyard->setText(tr("&View graveyard"));
|
||||
aViewRfg->setText(tr("&View exile"));
|
||||
playerMenu->setTitle(tr("Player \"%1\"").arg(name));
|
||||
playerMenu->setTitle(tr("Player \"%1\"").arg(userInfo->getName()));
|
||||
graveMenu->setTitle(tr("&Graveyard"));
|
||||
rfgMenu->setTitle(tr("&Exile"));
|
||||
|
||||
|
|
@ -1270,6 +1272,11 @@ QMenu *Player::getCardMenu() const
|
|||
return 0;
|
||||
}
|
||||
|
||||
QString Player::getName() const
|
||||
{
|
||||
return userInfo->getName();
|
||||
}
|
||||
|
||||
qreal Player::getMinimumWidth() const
|
||||
{
|
||||
qreal result = table->getMinimumWidth() + CARD_WIDTH + 5 + counterAreaWidth;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue