HDB: Fix Deliveries with no GFX

This commit is contained in:
Nipun Garg 2019-07-26 09:02:41 +05:30 committed by Eugene Sandulenko
parent 1edab20e02
commit 85b922895a

View File

@ -1161,6 +1161,7 @@ void Window::drawDeliveries() {
if (_dlvsInfo.delay1 < g_hdb->getTimeSlice()) {
// Draw Item
_gfxIndent->draw(drawX, drawY);
if (d->itemGfx)
d->itemGfx->drawMasked(drawX, drawY);
g_hdb->_gfx->setCursor(centerX - g_hdb->_gfx->stringLength(d->itemTextName) / 2, kDlvItemTextY);
@ -1190,6 +1191,7 @@ void Window::drawDeliveries() {
if (_dlvsInfo.delay3 < g_hdb->getTimeSlice()) {
// Draw Delivery
_gfxIndent->draw(drawX, drawY + kTileHeight + 16);
if (d->destGfx)
d->destGfx->drawMasked(drawX, drawY + kTileHeight + 16);
g_hdb->_gfx->setCursor(centerX - (g_hdb->_gfx->stringLength(d->destTextName) + g_hdb->_gfx->stringLength("to")) / 2, kDlvItemTextY + 12);
@ -1204,9 +1206,11 @@ void Window::drawDeliveries() {
} else {
// Draw Item
_gfxIndent->draw(drawX, drawY);
if (d->itemGfx)
d->itemGfx->drawMasked(drawX, drawY);
// Draw Delivery
_gfxIndent->draw(drawX, drawY + kTileHeight + 16);
if (d->destGfx)
d->destGfx->drawMasked(drawX, drawY + kTileHeight + 16);
if (!_dlvsInfo.animate && inv == _dlvsInfo.selected) {