Draw active powerups in columns of 3.
This commit is contained in:
parent
5a53f52472
commit
50b124f1a1
2 changed files with 19 additions and 4 deletions
|
|
@ -64,23 +64,38 @@ extend Class SWWMStatusBar
|
|||
xx += 36;
|
||||
if ( CPlayer.mo.InvSel && !isInventoryBarVisible() ) yy -= 34;
|
||||
}
|
||||
int drawcnt = 0;
|
||||
bool lastdrawn = false;
|
||||
for ( Inventory i=CPlayer.mo.Inv; i; i=i.Inv )
|
||||
{
|
||||
if ( (drawcnt > 0) && !(drawcnt%3) && lastdrawn )
|
||||
{
|
||||
xx += 36;
|
||||
yy = ss.y-(ymargin+invy+9);
|
||||
if ( CPlayer.mo.InvSel && !isInventoryBarVisible() ) yy -= 34;
|
||||
}
|
||||
lastdrawn = false;
|
||||
if ( (i is 'SWWMLamp') && (SWWMLamp(i).bActivated || (SWWMLamp(i).Charge < SWWMLamp(i).default.Charge)) )
|
||||
{
|
||||
DrawInvIcon(i,xx,yy,selected:true,aspowerup:true);
|
||||
yy -= 34;
|
||||
drawcnt++;
|
||||
lastdrawn = true;
|
||||
continue;
|
||||
}
|
||||
if ( (i is 'DivineSpriteEffect') && !DivineSpriteEffect(i).bHealDone )
|
||||
{
|
||||
DrawInvIcon(i,xx,yy,selected:true,aspowerup:true);
|
||||
yy -= 34;
|
||||
drawcnt++;
|
||||
lastdrawn = true;
|
||||
continue;
|
||||
}
|
||||
if ( !(i is 'Powerup') || (Powerup(i).EffectTics <= 0) || !(Powerup(i).Icon) ) continue;
|
||||
if ( DrawInvIcon(i,xx,yy) )
|
||||
yy -= 34;
|
||||
if ( !DrawInvIcon(i,xx,yy) ) continue;
|
||||
yy -= 34;
|
||||
drawcnt++;
|
||||
lastdrawn = true;
|
||||
}
|
||||
// inventory box / bar
|
||||
if ( !CPlayer.mo.InvSel ) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue