NOISSUE add a badge for crashed instances

Not persistent across MultiMC runs.
This commit is contained in:
Petr Mrázek
2016-11-04 01:17:28 +01:00
parent 3780a25d27
commit 87dd951505
10 changed files with 65 additions and 75 deletions

View File

@ -113,19 +113,22 @@ void drawProgressOverlay(QPainter *painter, const QStyleOptionViewItemV4 &option
void drawBadges(QPainter *painter, const QStyleOptionViewItemV4 &option, BaseInstance *instance)
{
QList<QString> pixmaps;
const BaseInstance::InstanceFlags flags = instance->flags();
if (flags & BaseInstance::VersionBrokenFlag)
{
pixmaps.append("broken");
}
if (flags & BaseInstance::UpdateAvailable)
{
pixmaps.append("updateavailable");
}
if (instance->isRunning())
{
pixmaps.append("status-running");
}
else if (instance->hasCrashed())
{
pixmaps.append("status-bad");
}
if (instance->hasVersionBroken())
{
pixmaps.append("broken");
}
if (instance->hasUpdateAvailable())
{
pixmaps.append("updateavailable");
}
// begin easter eggs
if (instance->name().contains("btw", Qt::CaseInsensitive) ||