Multiple background images on all zones (#4144)

This commit is contained in:
fdipilla 2020-10-23 16:36:02 -03:00 committed by GitHub
parent e10446f5b8
commit 1a94261490
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 84 additions and 5 deletions

View file

@ -76,7 +76,13 @@ QRectF HandZone::boundingRect() const
void HandZone::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/)
{
painter->fillRect(boundingRect(), themeManager->getHandBgBrush());
QBrush brush = themeManager->getHandBgBrush();
if (player->getZoneId() > 0) {
// If the extra image is not found, load the default one
brush = themeManager->getExtraHandBgBrush(QString::number(player->getZoneId()), brush);
}
painter->fillRect(boundingRect(), brush);
}
void HandZone::reorganizeCards()