mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-05-30 08:51:02 +00:00
* Updated to ZDoom 4030:
- Fixed: Popups weren't shown on the alternate HUD. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1507 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
91fdaf4d36
commit
30f02fdfa4
5 changed files with 54 additions and 44 deletions
|
@ -803,9 +803,10 @@ void D_Display ()
|
||||||
|
|
||||||
if (hud_althud && viewheight == SCREENHEIGHT && screenblocks > 10)
|
if (hud_althud && viewheight == SCREENHEIGHT && screenblocks > 10)
|
||||||
{
|
{
|
||||||
StatusBar->DrawBottomStuff (HUD_None);
|
StatusBar->DrawBottomStuff (HUD_AltHud);
|
||||||
if (DrawFSHUD || automapactive) DrawHUD();
|
if (DrawFSHUD || automapactive) DrawHUD();
|
||||||
StatusBar->DrawTopStuff (HUD_None);
|
StatusBar->Draw (HUD_AltHud);
|
||||||
|
StatusBar->DrawTopStuff (HUD_AltHud);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (viewheight == SCREENHEIGHT && viewactive && screenblocks > 10)
|
if (viewheight == SCREENHEIGHT && viewactive && screenblocks > 10)
|
||||||
|
|
|
@ -48,7 +48,9 @@ enum EHudState
|
||||||
{
|
{
|
||||||
HUD_StatusBar,
|
HUD_StatusBar,
|
||||||
HUD_Fullscreen,
|
HUD_Fullscreen,
|
||||||
HUD_None
|
HUD_None,
|
||||||
|
|
||||||
|
HUD_AltHud // Used for passing through popups to the alt hud
|
||||||
};
|
};
|
||||||
|
|
||||||
class AWeapon;
|
class AWeapon;
|
||||||
|
|
|
@ -1040,37 +1040,41 @@ public:
|
||||||
//prepare ammo counts
|
//prepare ammo counts
|
||||||
GetCurrentAmmo(ammo1, ammo2, ammocount1, ammocount2);
|
GetCurrentAmmo(ammo1, ammo2, ammocount1, ammocount2);
|
||||||
armor = CPlayer->mo->FindInventory<ABasicArmor>();
|
armor = CPlayer->mo->FindInventory<ABasicArmor>();
|
||||||
if(hud != lastHud)
|
|
||||||
{
|
|
||||||
script->huds[hud]->Tick(NULL, this, true);
|
|
||||||
|
|
||||||
// Restore scaling if need be.
|
if(state != HUD_AltHud)
|
||||||
if(scalingWasForced)
|
{
|
||||||
|
if(hud != lastHud)
|
||||||
{
|
{
|
||||||
scalingWasForced = false;
|
script->huds[hud]->Tick(NULL, this, true);
|
||||||
SetScaled(false);
|
|
||||||
setsizeneeded = true;
|
// Restore scaling if need be.
|
||||||
|
if(scalingWasForced)
|
||||||
|
{
|
||||||
|
scalingWasForced = false;
|
||||||
|
SetScaled(false);
|
||||||
|
setsizeneeded = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(currentPopup != POP_None && !script->huds[hud]->FullScreenOffsets())
|
if(currentPopup != POP_None && !script->huds[hud]->FullScreenOffsets())
|
||||||
script->huds[hud]->Draw(NULL, this, script->popups[currentPopup-1].getXDisplacement(), script->popups[currentPopup-1].getYDisplacement(), FRACUNIT);
|
script->huds[hud]->Draw(NULL, this, script->popups[currentPopup-1].getXDisplacement(), script->popups[currentPopup-1].getYDisplacement(), FRACUNIT);
|
||||||
else
|
|
||||||
script->huds[hud]->Draw(NULL, this, 0, 0, FRACUNIT);
|
|
||||||
lastHud = hud;
|
|
||||||
|
|
||||||
// Handle inventory bar drawing
|
|
||||||
if(CPlayer->inventorytics > 0 && !(level.flags & LEVEL_NOINVENTORYBAR) && (state == HUD_StatusBar || state == HUD_Fullscreen))
|
|
||||||
{
|
|
||||||
SBarInfoMainBlock *inventoryBar = state == HUD_StatusBar ? script->huds[STBAR_INVENTORY] : script->huds[STBAR_INVENTORYFULLSCREEN];
|
|
||||||
if(inventoryBar != lastInventoryBar)
|
|
||||||
inventoryBar->Tick(NULL, this, true);
|
|
||||||
|
|
||||||
// No overlay? Lets cancel it.
|
|
||||||
if(inventoryBar->NumCommands() == 0)
|
|
||||||
CPlayer->inventorytics = 0;
|
|
||||||
else
|
else
|
||||||
inventoryBar->DrawAux(NULL, this, 0, 0, FRACUNIT);
|
script->huds[hud]->Draw(NULL, this, 0, 0, FRACUNIT);
|
||||||
|
lastHud = hud;
|
||||||
|
|
||||||
|
// Handle inventory bar drawing
|
||||||
|
if(CPlayer->inventorytics > 0 && !(level.flags & LEVEL_NOINVENTORYBAR) && (state == HUD_StatusBar || state == HUD_Fullscreen))
|
||||||
|
{
|
||||||
|
SBarInfoMainBlock *inventoryBar = state == HUD_StatusBar ? script->huds[STBAR_INVENTORY] : script->huds[STBAR_INVENTORYFULLSCREEN];
|
||||||
|
if(inventoryBar != lastInventoryBar)
|
||||||
|
inventoryBar->Tick(NULL, this, true);
|
||||||
|
|
||||||
|
// No overlay? Lets cancel it.
|
||||||
|
if(inventoryBar->NumCommands() == 0)
|
||||||
|
CPlayer->inventorytics = 0;
|
||||||
|
else
|
||||||
|
inventoryBar->DrawAux(NULL, this, 0, 0, FRACUNIT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle popups
|
// Handle popups
|
||||||
|
|
|
@ -222,12 +222,7 @@ public:
|
||||||
{
|
{
|
||||||
DBaseStatusBar::Draw (state);
|
DBaseStatusBar::Draw (state);
|
||||||
|
|
||||||
if (state == HUD_Fullscreen)
|
if (state == HUD_StatusBar)
|
||||||
{
|
|
||||||
SB_state = screen->GetPageCount ();
|
|
||||||
DrawFullScreenStuff ();
|
|
||||||
}
|
|
||||||
else if (state == HUD_StatusBar)
|
|
||||||
{
|
{
|
||||||
if (SB_state != 0)
|
if (SB_state != 0)
|
||||||
{
|
{
|
||||||
|
@ -235,6 +230,20 @@ public:
|
||||||
}
|
}
|
||||||
DrawMainBar ();
|
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)
|
void ShowPop (int popnum)
|
||||||
|
@ -279,7 +288,7 @@ public:
|
||||||
bool MustDrawLog(EHudState state)
|
bool MustDrawLog(EHudState state)
|
||||||
{
|
{
|
||||||
// Tell the base class to draw the log if the pop screen won't be displayed.
|
// Tell the base class to draw the log if the pop screen won't be displayed.
|
||||||
return (state == HUD_None);
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
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)
|
void DrawPopScreen (int bottom)
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
// This file was automatically generated by the
|
// This file was automatically generated by the
|
||||||
// updaterevision tool. Do not edit by hand.
|
// updaterevision tool. Do not edit by hand.
|
||||||
|
|
||||||
#define ZD_SVN_REVISION_STRING "4029"
|
#define ZD_SVN_REVISION_STRING "4030"
|
||||||
#define ZD_SVN_REVISION_NUMBER 4029
|
#define ZD_SVN_REVISION_NUMBER 4030
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue