Hide inventory if selected. Clamp objective values to max.
This commit is contained in:
parent
69145189c9
commit
dacb561e62
|
@ -69,7 +69,10 @@ void drawHud(void)
|
||||||
|
|
||||||
drawText(5, 80, 16, TA_LEFT, colors.white, "Weapon: %s", getWeaponName(world.bob->weaponType));
|
drawText(5, 80, 16, TA_LEFT, colors.white, "Weapon: %s", getWeaponName(world.bob->weaponType));
|
||||||
|
|
||||||
drawInventory();
|
if (app.config.hudInventory)
|
||||||
|
{
|
||||||
|
drawInventory();
|
||||||
|
}
|
||||||
|
|
||||||
if (messageTime > 0)
|
if (messageTime > 0)
|
||||||
{
|
{
|
||||||
|
@ -235,7 +238,7 @@ void drawMissionStatus(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
drawText(x + 20, y, 24, TA_LEFT, c, o->description);
|
drawText(x + 20, y, 24, TA_LEFT, c, o->description);
|
||||||
drawText(SCREEN_WIDTH / 2 + 100, y, 24, TA_LEFT, c, "%d / %d", o->currentValue, o->targetValue);
|
drawText(SCREEN_WIDTH / 2 + 100, y, 24, TA_LEFT, c, "%d / %d", MIN(o->currentValue, o->targetValue), o->targetValue);
|
||||||
drawText(x + w - 20, y, 24, TA_RIGHT, c, status);
|
drawText(x + w - 20, y, 24, TA_RIGHT, c, status);
|
||||||
|
|
||||||
y += 55;
|
y += 55;
|
||||||
|
|
|
@ -31,6 +31,7 @@ extern Texture *getTexture(const char *filename);
|
||||||
extern SDL_Rect getCurrentFrame(Sprite *s);
|
extern SDL_Rect getCurrentFrame(Sprite *s);
|
||||||
extern int getPercent(float current, float total);
|
extern int getPercent(float current, float total);
|
||||||
|
|
||||||
|
extern App app;
|
||||||
extern Dev dev;
|
extern Dev dev;
|
||||||
extern Camera camera;
|
extern Camera camera;
|
||||||
extern Colors colors;
|
extern Colors colors;
|
||||||
|
|
Loading…
Reference in New Issue