mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Different backgrounds per player (#3990)
This commit is contained in:
parent
04274d2497
commit
fd0620445c
3 changed files with 14 additions and 1 deletions
|
|
@ -55,7 +55,14 @@ bool TableZone::isInverted() const
|
|||
|
||||
void TableZone::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/)
|
||||
{
|
||||
painter->fillRect(boundingRect(), themeManager->getTableBgBrush());
|
||||
QBrush brush = themeManager->getTableBgBrush();
|
||||
|
||||
// If the player is other than Player 1
|
||||
if (player->getId() > 0) {
|
||||
// The player's id starts with 0 so in order to get the correct image we need to add 1
|
||||
brush = themeManager->getExtraTableBgBrush(QString::number(player->getId() + 1));
|
||||
}
|
||||
painter->fillRect(boundingRect(), brush);
|
||||
|
||||
if (active) {
|
||||
paintZoneOutline(painter);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue