Added option to use a string instead of pause graphic
This commit is contained in:
parent
789829f967
commit
c98042ed02
3 changed files with 26 additions and 10 deletions
|
|
@ -1112,20 +1112,34 @@ void D_Display ()
|
|||
VMCall(func, params, countof(params), &ret, 1);
|
||||
skip = !!rv;
|
||||
}
|
||||
if ( !skip )
|
||||
if (!skip)
|
||||
{
|
||||
auto tex = TexMan.GetGameTextureByName(gameinfo.PauseSign.GetChars(), true);
|
||||
double x = (SCREENWIDTH - tex->GetDisplayWidth() * CleanXfac)/2 +
|
||||
tex->GetDisplayLeftOffset() * CleanXfac;
|
||||
DrawTexture(twod, tex, x, 4, DTA_CleanNoMove, true, TAG_DONE);
|
||||
int pausePos = 0;
|
||||
if (gameinfo.UsePauseString)
|
||||
{
|
||||
FFont* font = BigFont;
|
||||
FString pauseString = GStrings.GetString("PAUSE_STRING");
|
||||
DrawText(twod, font, CR_RED,
|
||||
(twod->GetWidth() - font->StringWidth(pauseString) * CleanXfac) / 2, 4, pauseString.GetChars(),
|
||||
DTA_CleanNoMove, true, TAG_DONE);
|
||||
pausePos = font->GetHeight() * CleanYfac + 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
auto tex = TexMan.GetGameTextureByName(gameinfo.PauseSign.GetChars(), true);
|
||||
double x = (SCREENWIDTH - tex->GetDisplayWidth() * CleanXfac) / 2 +
|
||||
tex->GetDisplayLeftOffset() * CleanXfac;
|
||||
DrawTexture(twod, tex, x, 4, DTA_CleanNoMove, true, TAG_DONE);
|
||||
pausePos = tex->GetDisplayHeight() * CleanYfac + 4;
|
||||
}
|
||||
if (paused && multiplayer)
|
||||
{
|
||||
FFont *font = generic_ui? NewSmallFont : SmallFont;
|
||||
FString pstring = GStrings.GetString("TXT_BY");
|
||||
pstring.Substitute("%s", players[paused - 1].userinfo.GetName());
|
||||
FFont *font = generic_ui ? NewSmallFont : SmallFont;
|
||||
FString plrString = GStrings.GetString("TXT_BY");
|
||||
plrString.Substitute("%s", players[paused - 1].userinfo.GetName());
|
||||
DrawText(twod, font, CR_RED,
|
||||
(twod->GetWidth() - font->StringWidth(pstring)*CleanXfac) / 2,
|
||||
(tex->GetDisplayHeight() * CleanYfac) + 4, pstring.GetChars(), DTA_CleanNoMove, true, TAG_DONE);
|
||||
(twod->GetWidth() - font->StringWidth(plrString)*CleanXfac) / 2, pausePos, plrString.GetChars(),
|
||||
DTA_CleanNoMove, true, TAG_DONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -398,6 +398,7 @@ void FMapInfoParser::ParseGameInfo()
|
|||
GAMEINFOKEY_STRING(BasicArmorClass, "BasicArmorClass")
|
||||
GAMEINFOKEY_STRING(HexenArmorClass, "HexenArmorClass")
|
||||
GAMEINFOKEY_STRING(PauseSign, "pausesign")
|
||||
GAMEINFOKEY_BOOL(UsePauseString, "usepausestring")
|
||||
GAMEINFOKEY_STRING(quitSound, "quitSound")
|
||||
GAMEINFOKEY_STRING(BorderFlat, "borderFlat")
|
||||
GAMEINFOKEY_DOUBLE(telefogheight, "telefogheight")
|
||||
|
|
|
|||
|
|
@ -151,6 +151,7 @@ struct gameinfo_t
|
|||
FName BasicArmorClass;
|
||||
FName HexenArmorClass;
|
||||
FString PauseSign;
|
||||
bool UsePauseString;
|
||||
FString Endoom;
|
||||
double Armor2Percent;
|
||||
FString quitSound;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue