mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-01 08:31:45 +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;
|
applyscale = false;
|
||||||
}
|
}
|
||||||
if(type == PLAYERICON)
|
if(type == PLAYERICON)
|
||||||
texture = TexMan[statusBar->CPlayer->mo->ScoreIcon];
|
texture = TexMan(statusBar->CPlayer->mo->ScoreIcon);
|
||||||
else if(type == AMMO1)
|
else if(type == AMMO1)
|
||||||
{
|
{
|
||||||
AAmmo *ammo = statusBar->ammo1;
|
AAmmo *ammo = statusBar->ammo1;
|
||||||
|
@ -270,7 +270,7 @@ class CommandDrawImage : public SBarInfoCommandFlowControl
|
||||||
{
|
{
|
||||||
AInventory *item = statusBar->CPlayer->mo->FindInventory<ASigil>();
|
AInventory *item = statusBar->CPlayer->mo->FindInventory<ASigil>();
|
||||||
if (item != NULL)
|
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)
|
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)
|
else if(type == INVENTORYICON)
|
||||||
texture = TexMan[sprite];
|
texture = TexMan(sprite);
|
||||||
else if(type == SELECTEDINVENTORYICON && statusBar->CPlayer->mo->InvSel != NULL)
|
else if(type == SELECTEDINVENTORYICON && statusBar->CPlayer->mo->InvSel != NULL)
|
||||||
texture = TexMan(statusBar->CPlayer->mo->InvSel->Icon);
|
texture = TexMan(statusBar->CPlayer->mo->InvSel->Icon);
|
||||||
else if(image >= 0)
|
else if(image >= 0)
|
||||||
|
@ -312,7 +312,7 @@ class CommandDrawImage : public SBarInfoCommandFlowControl
|
||||||
spawnScaleY = item->Scale.Y;
|
spawnScaleY = item->Scale.Y;
|
||||||
}
|
}
|
||||||
|
|
||||||
texture = TexMan[icon];
|
texture = TexMan(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
enum ImageType
|
enum ImageType
|
||||||
|
@ -2436,22 +2436,22 @@ class CommandDrawKeyBar : public SBarInfoCommand
|
||||||
{
|
{
|
||||||
if(!vertical)
|
if(!vertical)
|
||||||
{
|
{
|
||||||
statusBar->DrawGraphic(TexMan[item->Icon], x+slotOffset, y+rowOffset, block->XOffset(), block->YOffset(), block->Alpha(), block->FullScreenOffsets());
|
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;
|
rowWidth = rowIconSize == -1 ? TexMan(item->Icon)->GetScaledHeight()+2 : rowIconSize;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
statusBar->DrawGraphic(TexMan[item->Icon], x+rowOffset, y+slotOffset, block->XOffset(), block->YOffset(), block->Alpha(), block->FullScreenOffsets());
|
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;
|
rowWidth = rowIconSize == -1 ? TexMan(item->Icon)->GetScaledWidth()+2 : rowIconSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If cmd.special is -1 then the slot size is auto detected
|
// If cmd.special is -1 then the slot size is auto detected
|
||||||
if(iconSize == -1)
|
if(iconSize == -1)
|
||||||
{
|
{
|
||||||
if(!vertical)
|
if(!vertical)
|
||||||
slotOffset += (reverse ? -1 : 1) * (TexMan[item->Icon]->GetScaledWidth() + 2);
|
slotOffset += (reverse ? -1 : 1) * (TexMan(item->Icon)->GetScaledWidth() + 2);
|
||||||
else
|
else
|
||||||
slotOffset += (reverse ? -1 : 1) * (TexMan[item->Icon]->GetScaledHeight() + 2);
|
slotOffset += (reverse ? -1 : 1) * (TexMan(item->Icon)->GetScaledHeight() + 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
slotOffset += (reverse ? -iconSize : iconSize);
|
slotOffset += (reverse ? -iconSize : iconSize);
|
||||||
|
|
Loading…
Reference in a new issue