mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 20:43:15 +00:00
- Fixed: SBarInfo didn't support animated images in some places.
This commit is contained in:
parent
55ee78fc0b
commit
640bf2a6d4
1 changed files with 10 additions and 10 deletions
|
@ -241,7 +241,7 @@ class CommandDrawImage : public SBarInfoCommandFlowControl
|
|||
applyscale = false;
|
||||
}
|
||||
if(type == PLAYERICON)
|
||||
texture = TexMan[statusBar->CPlayer->mo->ScoreIcon];
|
||||
texture = TexMan(statusBar->CPlayer->mo->ScoreIcon);
|
||||
else if(type == AMMO1)
|
||||
{
|
||||
AAmmo *ammo = statusBar->ammo1;
|
||||
|
@ -270,7 +270,7 @@ class CommandDrawImage : public SBarInfoCommandFlowControl
|
|||
{
|
||||
AInventory *item = statusBar->CPlayer->mo->FindInventory<ASigil>();
|
||||
if (item != NULL)
|
||||
texture = TexMan[item->Icon];
|
||||
texture = TexMan(item->Icon);
|
||||
}
|
||||
else if(type == HEXENARMOR_ARMOR || type == HEXENARMOR_SHIELD || type == HEXENARMOR_HELM || type == HEXENARMOR_AMULET)
|
||||
{
|
||||
|
@ -290,7 +290,7 @@ class CommandDrawImage : public SBarInfoCommandFlowControl
|
|||
}
|
||||
}
|
||||
else if(type == INVENTORYICON)
|
||||
texture = TexMan[sprite];
|
||||
texture = TexMan(sprite);
|
||||
else if(type == SELECTEDINVENTORYICON && statusBar->CPlayer->mo->InvSel != NULL)
|
||||
texture = TexMan(statusBar->CPlayer->mo->InvSel->Icon);
|
||||
else if(image >= 0)
|
||||
|
@ -312,7 +312,7 @@ class CommandDrawImage : public SBarInfoCommandFlowControl
|
|||
spawnScaleY = item->Scale.Y;
|
||||
}
|
||||
|
||||
texture = TexMan[icon];
|
||||
texture = TexMan(icon);
|
||||
}
|
||||
|
||||
enum ImageType
|
||||
|
@ -2436,22 +2436,22 @@ class CommandDrawKeyBar : public SBarInfoCommand
|
|||
{
|
||||
if(!vertical)
|
||||
{
|
||||
statusBar->DrawGraphic(TexMan[item->Icon], x+slotOffset, y+rowOffset, block->XOffset(), block->YOffset(), block->Alpha(), block->FullScreenOffsets());
|
||||
rowWidth = rowIconSize == -1 ? TexMan[item->Icon]->GetScaledHeight()+2 : rowIconSize;
|
||||
statusBar->DrawGraphic(TexMan(item->Icon), x+slotOffset, y+rowOffset, block->XOffset(), block->YOffset(), block->Alpha(), block->FullScreenOffsets());
|
||||
rowWidth = rowIconSize == -1 ? TexMan(item->Icon)->GetScaledHeight()+2 : rowIconSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
statusBar->DrawGraphic(TexMan[item->Icon], x+rowOffset, y+slotOffset, block->XOffset(), block->YOffset(), block->Alpha(), block->FullScreenOffsets());
|
||||
rowWidth = rowIconSize == -1 ? TexMan[item->Icon]->GetScaledWidth()+2 : rowIconSize;
|
||||
statusBar->DrawGraphic(TexMan(item->Icon), x+rowOffset, y+slotOffset, block->XOffset(), block->YOffset(), block->Alpha(), block->FullScreenOffsets());
|
||||
rowWidth = rowIconSize == -1 ? TexMan(item->Icon)->GetScaledWidth()+2 : rowIconSize;
|
||||
}
|
||||
|
||||
// If cmd.special is -1 then the slot size is auto detected
|
||||
if(iconSize == -1)
|
||||
{
|
||||
if(!vertical)
|
||||
slotOffset += (reverse ? -1 : 1) * (TexMan[item->Icon]->GetScaledWidth() + 2);
|
||||
slotOffset += (reverse ? -1 : 1) * (TexMan(item->Icon)->GetScaledWidth() + 2);
|
||||
else
|
||||
slotOffset += (reverse ? -1 : 1) * (TexMan[item->Icon]->GetScaledHeight() + 2);
|
||||
slotOffset += (reverse ? -1 : 1) * (TexMan(item->Icon)->GetScaledHeight() + 2);
|
||||
}
|
||||
else
|
||||
slotOffset += (reverse ? -iconSize : iconSize);
|
||||
|
|
Loading…
Reference in a new issue