New privuser gummys (#2305)

* New user gummys based on account privilege level

This change add's new user gummy icons for vip/donator priv levels that
are now available.

YaY for Zach!
This commit is contained in:
woogerboy21 2016-12-08 19:52:25 -08:00 committed by Zach H
parent e0636db60d
commit 960ecaaeda
18 changed files with 1967 additions and 34 deletions

View file

@ -82,7 +82,7 @@ void UserInfoBox::updateInfo(const ServerInfo_User &user)
QPixmap avatarPixmap;
const std::string bmp = user.avatar_bmp();
if (!avatarPixmap.loadFromData((const uchar *) bmp.data(), bmp.size()))
avatarPixmap = UserLevelPixmapGenerator::generatePixmap(64, userLevel, false);
avatarPixmap = UserLevelPixmapGenerator::generatePixmap(64, userLevel, false, QString::fromStdString(user.privlevel()));
avatarLabel.setPixmap(avatarPixmap.scaled(avatarLabel.size(), Qt::KeepAspectRatio, Qt::SmoothTransformation));
nameLabel.setText(QString::fromStdString(user.name()));
@ -100,7 +100,7 @@ void UserInfoBox::updateInfo(const ServerInfo_User &user)
countryLabel3.setText("");
}
userLevelLabel2.setPixmap(UserLevelPixmapGenerator::generatePixmap(15, userLevel, false));
userLevelLabel2.setPixmap(UserLevelPixmapGenerator::generatePixmap(15, userLevel, false, QString::fromStdString(user.privlevel())));
QString userLevelText;
if (userLevel.testFlag(ServerInfo_User::IsAdmin))
userLevelText = tr("Administrator");