- Fixed: Popups weren't shown on the alt hud.

SVN r4030 (trunk)
This commit is contained in:
Braden Obrzut 2013-01-21 21:02:14 +00:00
parent 76b5757dab
commit e86f27a7a6
4 changed files with 52 additions and 42 deletions

View File

@ -803,9 +803,10 @@ void D_Display ()
if (hud_althud && viewheight == SCREENHEIGHT && screenblocks > 10)
{
StatusBar->DrawBottomStuff (HUD_None);
StatusBar->DrawBottomStuff (HUD_AltHud);
if (DrawFSHUD || automapactive) DrawHUD();
StatusBar->DrawTopStuff (HUD_None);
StatusBar->Draw (HUD_AltHud);
StatusBar->DrawTopStuff (HUD_AltHud);
}
else
if (viewheight == SCREENHEIGHT && viewactive && screenblocks > 10)

View File

@ -48,7 +48,9 @@ enum EHudState
{
HUD_StatusBar,
HUD_Fullscreen,
HUD_None
HUD_None,
HUD_AltHud // Used for passing through popups to the alt hud
};
class AWeapon;

View File

@ -1040,6 +1040,9 @@ public:
//prepare ammo counts
GetCurrentAmmo(ammo1, ammo2, ammocount1, ammocount2);
armor = CPlayer->mo->FindInventory<ABasicArmor>();
if(state != HUD_AltHud)
{
if(hud != lastHud)
{
script->huds[hud]->Tick(NULL, this, true);
@ -1072,6 +1075,7 @@ public:
else
inventoryBar->DrawAux(NULL, this, 0, 0, FRACUNIT);
}
}
// Handle popups
if(currentPopup != POP_None)

View File

@ -222,12 +222,7 @@ public:
{
DBaseStatusBar::Draw (state);
if (state == HUD_Fullscreen)
{
SB_state = screen->GetPageCount ();
DrawFullScreenStuff ();
}
else if (state == HUD_StatusBar)
if (state == HUD_StatusBar)
{
if (SB_state != 0)
{
@ -235,6 +230,20 @@ public:
}
DrawMainBar ();
}
else
{
if (state == HUD_Fullscreen)
{
SB_state = screen->GetPageCount ();
DrawFullScreenStuff ();
}
// Draw pop screen (log, keys, and status)
if (CurrentPop != POP_None && PopHeight < 0)
{
DrawPopScreen (screen->GetHeight());
}
}
}
void ShowPop (int popnum)
@ -279,7 +288,7 @@ public:
bool MustDrawLog(EHudState state)
{
// Tell the base class to draw the log if the pop screen won't be displayed.
return (state == HUD_None);
return false;
}
private:
@ -554,12 +563,6 @@ private:
}
}
}
// Draw pop screen (log, keys, and status)
if (CurrentPop != POP_None && PopHeight < 0)
{
DrawPopScreen (screen->GetHeight());
}
}
void DrawPopScreen (int bottom)