Marked VIP badge as "channel authority" badge (#1117)

* Marked VIP badge as authority badge

* Added vip.png resource

* Registered VIP icon resource

* Update ResourcesAutogen.cpp

* Update ResourcesAutogen.hpp

* Update ResourcesAutogen.hpp
This commit is contained in:
Ruben Anders 2019-07-13 15:55:15 +02:00 committed by pajlada
parent 386109691b
commit feef6c6aaa
5 changed files with 13 additions and 3 deletions

View file

@ -74,5 +74,6 @@
<file>twitch/subscriber.png</file>
<file>twitch/turbo.png</file>
<file>twitch/verified.png</file>
<file>twitch/vip.png</file>
</qresource>
</RCC>
</RCC>

BIN
resources/twitch/vip.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

View file

@ -43,6 +43,7 @@ Resources2::Resources2()
this->twitch.subscriber = QPixmap(":/twitch/subscriber.png");
this->twitch.turbo = QPixmap(":/twitch/turbo.png");
this->twitch.verified = QPixmap(":/twitch/verified.png");
this->twitch.vip = QPixmap(":/twitch/vip.png");
}
} // namespace chatterino
} // namespace chatterino

View file

@ -55,7 +55,8 @@ public:
QPixmap subscriber;
QPixmap turbo;
QPixmap verified;
QPixmap vip;
} twitch;
};
} // namespace chatterino
} // namespace chatterino

View file

@ -1082,6 +1082,13 @@ void TwitchMessageBuilder::appendTwitchBadges()
MessageElementFlag::BadgeChannelAuthority)
->setTooltip("Twitch Channel Moderator");
}
else if (badge == "vip/1")
{
this->emplace<ImageElement>(
Image::fromPixmap(app->resources->twitch.vip),
MessageElementFlag::BadgeChannelAuthority)
->setTooltip("VIP");
}
else if (badge == "broadcaster/1")
{
this->emplace<ImageElement>(