Update to showing objective numbers.
This commit is contained in:
parent
8847105d6f
commit
5e8b983f3e
|
@ -142,10 +142,12 @@ static void drawObjectives(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
drawText(SCREEN_WIDTH / 2 - 100, y, 22, TA_RIGHT, colors.white, o->description);
|
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, 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]);
|
drawText(SCREEN_WIDTH / 2 + 100, y, 22, TA_LEFT, color, objectiveStatus[o->status]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -170,6 +170,10 @@ void updateCondition(char *name, int type)
|
||||||
o->status = OS_FAILED;
|
o->status = OS_FAILED;
|
||||||
addHudMessage(colors.red, _("%s - Objective Failed!"), o->description);
|
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->active = getJSONValue(node, "active", 1);
|
||||||
o->isCondition = getJSONValue(node, "isCondition", 0);
|
o->isCondition = getJSONValue(node, "isCondition", 0);
|
||||||
o->isEliminateAll = getJSONValue(node, "isEliminateAll", 0);
|
o->isEliminateAll = getJSONValue(node, "isEliminateAll", 0);
|
||||||
o->hideNumbers = getJSONValue(node, "hideNumbers", 0);
|
o->hideNumbers = getJSONValue(node, "hideNumbers", o->isCondition);
|
||||||
|
|
||||||
if (o->isEliminateAll)
|
if (o->isEliminateAll)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue