mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-15 20:20:54 +00:00
- same procedure for Blood.
This time there were 3 additional texts and the notify display, though, except for multiplayer content that wasn't touched yet. The result is the same: No need to extend the tiny font with international characters
This commit is contained in:
parent
4c2ff2950a
commit
e8cd336f86
4 changed files with 36 additions and 6 deletions
|
@ -209,7 +209,7 @@ void GameInterface::DrawNativeMenuText(int fontnum, int state, double xpos, doub
|
|||
int shade = (state != NIT_InactiveState) ? 32 : 48;
|
||||
int pal = (state != NIT_InactiveState) ? 5 : 5;
|
||||
if (state == NIT_SelectedState) shade = 32 - (I_GetBuildTime() & 63);
|
||||
auto gamefont = fontnum == NIT_BigFont ? BigFont : fontnum == NIT_SmallFont ? SmallFont : SmallFont2;
|
||||
auto gamefont = fontnum == NIT_BigFont ? BigFont : SmallFont;
|
||||
|
||||
if (flags & LMF_Centered)
|
||||
{
|
||||
|
|
|
@ -144,7 +144,10 @@ class DBloodSummaryScreen : public DScreenJob
|
|||
DrawMenuCaption(GStrings("TXTB_LEVELSTATS"));
|
||||
if (bPlayerCheated)
|
||||
{
|
||||
viewDrawText(3, GStrings("TXTB_CHEATED"), 160, 32, -128, 0, 1, 1);
|
||||
auto text = GStrings("TXTB_CHEATED");
|
||||
int font = 3;
|
||||
if (!SmallFont2->CanPrint(text)) font = 0;
|
||||
viewDrawText(font, text, 160, 32, -128, 0, 1, font == 3);
|
||||
}
|
||||
DrawKills();
|
||||
DrawSecrets();
|
||||
|
@ -157,7 +160,10 @@ class DBloodSummaryScreen : public DScreenJob
|
|||
int myclock = int(clock * 120 / 1'000'000'000);
|
||||
if ((myclock & 32))
|
||||
{
|
||||
viewDrawText(3, GStrings("PRESSKEY"), 160, 134, -128, 0, 1, 1);
|
||||
auto text = GStrings("PRESSKEY");
|
||||
int font = 3;
|
||||
if (!SmallFont2->CanPrint(text)) font = 0;
|
||||
viewDrawText(font, text, 160, 134, -128, 0, 1, font == 3);
|
||||
}
|
||||
return skiprequest ? -1 : 1;
|
||||
}
|
||||
|
@ -297,7 +303,12 @@ public:
|
|||
drawTextScreenBackground();
|
||||
DrawMenuCaption(pzLoadingScreenText1);
|
||||
viewDrawText(1, rec->DisplayName(), 160, 50, -128, 0, 1, 1);
|
||||
viewDrawText(3, GStrings("TXTB_PLSWAIT"), 160, 134, -128, 0, 1, 1);
|
||||
|
||||
auto text = GStrings("TXTB_PLSWAIT");
|
||||
int font = 3;
|
||||
if (!SmallFont2->CanPrint(text)) font = 0;
|
||||
|
||||
viewDrawText(font, GStrings("TXTB_PLSWAIT"), 160, 134, -128, 0, 1, font == 3);
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -226,13 +226,21 @@ private:
|
|||
|
||||
if (automapMode == am_full)
|
||||
{
|
||||
bool textfont = am_textfont;
|
||||
if (!am_textfont)
|
||||
{
|
||||
// For non-English languages force use of the text font. The tiny one is simply too small to ever add localized characters to it.
|
||||
auto p = GStrings["REQUIRED_CHARACTERS"];
|
||||
if (p && *p) textfont = true;
|
||||
}
|
||||
|
||||
if (!textfont)
|
||||
{
|
||||
stats.font = SmallFont2;
|
||||
stats.spacing = 6;
|
||||
}
|
||||
if (hud_size <= Hud_StbarOverlay) stats.screenbottomspace = 56;
|
||||
DBaseStatusBar::PrintAutomapInfo(stats);
|
||||
DBaseStatusBar::PrintAutomapInfo(stats, textfont);
|
||||
}
|
||||
if (automapMode == am_off && hud_stats)
|
||||
{
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
#include "g_input.h"
|
||||
#include "menu.h"
|
||||
#include "raze_music.h"
|
||||
#include "gstrings.h"
|
||||
|
||||
#define LEFTMARGIN 8
|
||||
#define RIGHTMARGIN 8
|
||||
|
@ -1143,12 +1144,22 @@ void FNotifyBuffer::DrawNative()
|
|||
}
|
||||
}
|
||||
|
||||
static bool printNative()
|
||||
{
|
||||
// Blood originally uses its tiny font for the notify display which does not play along well with localization because it is too small
|
||||
if (con_notify_advanced) return false;
|
||||
if (!(g_gameType & GAMEFLAG_BLOOD)) return true;
|
||||
auto p = GStrings["REQUIRED_CHARACTERS"];
|
||||
if (p && *p) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void FNotifyBuffer::Draw()
|
||||
{
|
||||
if (gamestate == GS_FULLCONSOLE || gamestate == GS_MENUSCREEN)
|
||||
return;
|
||||
|
||||
if (!con_notify_advanced)
|
||||
if (printNative())
|
||||
{
|
||||
DrawNative();
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue