Update to showing objective numbers.

This commit is contained in:
Steve 2016-04-07 12:39:53 +01:00
parent 8847105d6f
commit 5e8b983f3e
2 changed files with 8 additions and 2 deletions

View File

@ -142,10 +142,12 @@ static void drawObjectives(void)
}
drawText(SCREEN_WIDTH / 2 - 100, y, 22, TA_RIGHT, colors.white, o->description);
if (o->targetValue > 1 && !o->isCondition && !o->hideNumbers)
if (o->targetValue > 1 && !o->hideNumbers)
{
drawText(SCREEN_WIDTH / 2, y, 22, TA_CENTER, colors.white, "%d / %d", o->currentValue, o->targetValue);
}
drawText(SCREEN_WIDTH / 2 + 100, y, 22, TA_LEFT, color, objectiveStatus[o->status]);
}
}

View File

@ -170,6 +170,10 @@ void updateCondition(char *name, int type)
o->status = OS_FAILED;
addHudMessage(colors.red, _("%s - Objective Failed!"), o->description);
}
else if (!o->hideNumbers)
{
addHudMessage(colors.red, "%s - %d / %d", o->description, o->currentValue, o->targetValue);
}
}
}
}
@ -251,7 +255,7 @@ void loadObjectives(cJSON *node)
o->active = getJSONValue(node, "active", 1);
o->isCondition = getJSONValue(node, "isCondition", 0);
o->isEliminateAll = getJSONValue(node, "isEliminateAll", 0);
o->hideNumbers = getJSONValue(node, "hideNumbers", 0);
o->hideNumbers = getJSONValue(node, "hideNumbers", o->isCondition);
if (o->isEliminateAll)
{