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

@ -47,7 +47,13 @@ QRectF StackZone::boundingRect() const
void StackZone::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*option*/, QWidget * /*widget*/)
{
painter->fillRect(boundingRect(), themeManager->getStackBgBrush());
QBrush brush = themeManager->getStackBgBrush();
if (player->getZoneId() > 0) {
// If the extra image is not found, load the default one
brush = themeManager->getExtraStackBgBrush(QString::number(player->getZoneId()), brush);
}
painter->fillRect(boundingRect(), brush);
}
void StackZone::handleDropEvent(const QList<CardDragItem *> &dragItems,