- layout adjustments for localized texts.

In particular SW's main menu was far too tightly spaced, allowing no room for accents.
This commit is contained in:
Christoph Oelckers 2021-05-31 00:04:04 +02:00
parent af781e0422
commit 90bcba302e
6 changed files with 19 additions and 8 deletions

View file

@ -983,11 +983,13 @@ int RunGame()
GameTicRate = 30;
CheckUserMap();
GPalette.Init(MAXPALOOKUPS + 2); // one slot for each translation, plus a separate one for the base palettes and the internal one
gi->loadPalette();
StartScreen->Progress();
TexMan.Init([]() {}, [](BuildInfo &) {});
StartScreen->Progress();
TileFiles.Init();
TileFiles.LoadArtSet("tiles%03d.art"); // it's the same for all games.
InitFont();
StartScreen->Progress();
I_InitSound();
@ -1008,8 +1010,6 @@ int RunGame()
gameinfo.mBackButton = "engine/graphics/m_back.png";
StartScreen->Progress();
GPalette.Init(MAXPALOOKUPS + 1); // one slot for each translation, plus a separate one for the base palettes.
gi->loadPalette();
voxInit();
engineInit();
gi->app_init();
@ -1023,10 +1023,11 @@ int RunGame()
if (!(paletteloaded & PALETTE_MAIN))
I_FatalError("No palette found.");
V_LoadTranslations(); // loading the translations must be delayed until the palettes have been fully set up.
lookups.postLoadTables();
PostLoadSetup();
lookups.postLoadLookups();
V_LoadTranslations(); // loading the translations must be delayed until the palettes have been fully set up.
FMaterial::SetLayerCallback(setpalettelayer);
if (GameStartupInfo.Name.IsNotEmpty()) I_SetWindowTitle(GameStartupInfo.Name);
DeleteStartupScreen();

View file

@ -303,6 +303,7 @@ void LookupTableInfo::postLoadLookups()
}
colorswap(&GPalette.GlobalBrightmap);
std::swap(GPalette.BaseColors[0], GPalette.BaseColors[255]);
GPalette.Remap[0] = 255;
}
//==========================================================================

View file

@ -44,7 +44,7 @@ LISTMENU "MainMenu"
ifgame(ShadowWarrior)
{
Position 55, 32
Linespacing 17
Linespacing 21
SWLogo
SWTextItem "$MNU_NEWGAME", "n", "EpisodeMenu"
SWTextItem "$MNU_LOADGAME", "l", "LoadGameMenu"

View file

@ -138,7 +138,7 @@ class BloodStatusBar : RazeStatusBar
StatsPrintInfo stats;
stats.fontscale = 1.;
stats.spacing = SmallFont.GetHeight() + 1;
stats.spacing = SmallFont.GetHeight() + 2;
stats.screenbottomspace = bottomy;
stats.statfont = SmallFont;
stats.letterColor = TEXTCOLOR_DARKRED;

View file

@ -187,7 +187,12 @@ class DukeCommonStatusBar : RazeStatusBar
stats.statfont = SmallFont2;
stats.spacing = 6;
}
else stats.spacing = stats.statfont.GetHeight() + 1;
else
{
if (Raze.isNamWW2GI()) stats.spacing = 12;
else if (!Raze.isRR()) stats.spacing = 11;
else stats.spacing = 14;
}
stats.standardColor = (Raze.isNamWW2GI() && am_textfont)? Font.TEXTCOLOR_ORANGE : Font.TEXTCOLOR_UNTRANSLATED;
stats.letterColor = Font.TEXTCOLOR_GOLD;
PrintAutomapInfo(stats, textfont);

View file

@ -77,6 +77,8 @@ class RazeStatusBar : StatusBarCore
y3 = y;
String text;
Console.Printf("Stat: scale = %f, spacing = %f", scale, spacing);
text = String.Format("%sT: %s%d:%02d", info.letterColor, info.standardColor, stats.time / 60000, (stats.time % 60000) / 1000);
drawStatText(info.statFont, 2 * hud_statscale, y3, text, scale);
@ -129,17 +131,19 @@ class RazeStatusBar : StatusBarCore
}
else if (info.screenbottomspace < 0)
{
y = 200 - RelTop - spacing;
y = (200 - RelTop) * hud_scalefactor - spacing;
}
else
{
y = 200 - info.screenbottomspace - spacing;
y = 200 - info.screenbottomspace * hud_scalefactor - spacing;
}
let cluster = lev.GetCluster();
String volname;
if (cluster) volname = cluster.name;
if (volname.length() == 0 && am_nameontop) y = 1;
Console.Printf("AM: scale = %f, spacing = %f", scale, spacing);
Screen.DrawText(info.statfont, Font.CR_UNTRANSLATED, 2 * hud_statscale, y, mapname, DTA_FullscreenScale, FSMode_ScaleToHeight, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200,
DTA_ScaleX, scale, DTA_ScaleY, scale, DTA_KeepRatio, true);
y -= spacing;