DM: Add F0344_INVENTORY_DrawPanel_FoodOrWaterBar

This commit is contained in:
Bendegúz Nagy 2016-06-20 22:20:58 +02:00
parent 3385a3dd5c
commit 8c007d02fa
2 changed files with 17 additions and 0 deletions

View File

@ -107,4 +107,20 @@ void InventoryMan::drawPanelHorizontalBar(int16 x, int16 y, int16 pixelWidth, Co
_vm->_displayMan->clearScreenBox(color, box);
}
void InventoryMan::drawPanelFoodOrWaterBar(int16 amount, int16 y, Color color) {
if (amount < -512) {
color = kColorRed;
} else if(amount < 0) {
color = kColorYellow;
}
int16 pixelWidth = amount + 1024;
if (pixelWidth == 3072) {
pixelWidth = 3071;
}
pixelWidth /= 32;
drawPanelHorizontalBar(115, y + 2, pixelWidth, kColorBlack);
drawPanelHorizontalBar(113, y, pixelWidth, color);
}
}

View File

@ -16,6 +16,7 @@ public:
void toggleInventory(ChampionIndex championIndex); // @ F0355_INVENTORY_Toggle_CPSE
void drawStatusBoxPortrait(ChampionIndex championIndex); // @ F0354_INVENTORY_DrawStatusBoxPortrait
void drawPanelHorizontalBar(int16 x, int16 y, int16 pixelWidth, Color color); // @ F0343_INVENTORY_DrawPanel_HorizontalBar
void drawPanelFoodOrWaterBar(int16 amount, int16 y, Color color); // @ F0344_INVENTORY_DrawPanel_FoodOrWaterBar
};
}