HUD fixes that I forgot about.

This commit is contained in:
Marisa the Magician 2022-12-01 10:33:47 +01:00
commit 249b91e397

View file

@ -868,7 +868,11 @@ Class UnrealHUD : BaseStatusBar
override bool ProcessNotify( EPrintLevel printlevel, String outline ) override bool ProcessNotify( EPrintLevel printlevel, String outline )
{ {
if ( printlevel == PRINT_LOW ) if ( gamestate != GS_LEVEL ) return false; // not during intermissions
int rprintlevel = printlevel&PRINT_TYPES;
if ( (rprintlevel < PRINT_LOW) || (rprintlevel > PRINT_TEAMCHAT) ) rprintlevel = PRINT_HIGH;
outline.DeleteLastCharacter();
if ( rprintlevel == PRINT_LOW )
{ {
// set pickup message // set pickup message
PickupMsg = outline; PickupMsg = outline;
@ -884,8 +888,8 @@ Class UnrealHUD : BaseStatusBar
ShortMsgTic[i] = ShortMsgTic[i-1]; ShortMsgTic[i] = ShortMsgTic[i-1];
ShortMsgCol[i] = ShortMsgCol[i-1]; ShortMsgCol[i] = ShortMsgCol[i-1];
} }
if ( printlevel == PRINT_MEDIUM ) ShortMsgCol[0] = Font.CR_RED; if ( rprintlevel == PRINT_MEDIUM ) ShortMsgCol[0] = Font.CR_RED;
else if ( (printlevel == PRINT_CHAT) || (printlevel == PRINT_TEAMCHAT) ) ShortMsgCol[0] = Font.CR_GREEN; else if ( (rprintlevel == PRINT_CHAT) || (rprintlevel == PRINT_TEAMCHAT) ) ShortMsgCol[0] = Font.CR_GREEN;
else ShortMsgCol[0] = Font.CR_WHITE; else ShortMsgCol[0] = Font.CR_WHITE;
ShortMsg[0] = outline; ShortMsg[0] = outline;
ShortMsgTic[0] = gametic+70; ShortMsgTic[0] = gametic+70;
@ -926,6 +930,23 @@ Class UnrealHUD : BaseStatusBar
return true; return true;
} }
override bool DrawPaused( int player )
{
Screen.Dim(Color(0,24,64),.4,0,0,Screen.GetWidth(),Screen.GetHeight(),STYLE_Add);
String str = "PAUSED";
double xx = (Screen.GetWidth()-LargeFont.StringWidth(str))/2;
double yy = (Screen.GetHeight()-LargeFont.GetHeight())/2;
Screen.DrawText(LargeFont,Font.CR_UNTRANSLATED,xx,yy,str);
if ( multiplayer && (player != -1) )
{
str = "by "..players[player].GetUserName();
xx = (Screen.GetWidth()-MedFont.StringWidth(str))/2;
yy += LargeFont.GetHeight();
Screen.DrawText(MedFont,Font.CR_UNTRANSLATED,xx,yy,str);
}
return true;
}
private void DrawMessages( int state ) private void DrawMessages( int state )
{ {
if ( (MidPrintStr.Length() > 0) && (MidPrintTic > gametic) ) if ( (MidPrintStr.Length() > 0) && (MidPrintTic > gametic) )