mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- changed the scale range of hud_statscale so that 1 is for fullscreen 320x200.
This commit is contained in:
parent
e7c58a5b29
commit
88bcaf37ab
3 changed files with 10 additions and 13 deletions
|
@ -633,7 +633,7 @@ private:
|
||||||
}
|
}
|
||||||
drawInventory(pPlayer, 166, 200 - tilesiz[2200].y);
|
drawInventory(pPlayer, 166, 200 - tilesiz[2200].y);
|
||||||
// Depending on the scale we can lower the stats display. This needs some tweaking but this catches the important default case already.
|
// Depending on the scale we can lower the stats display. This needs some tweaking but this catches the important default case already.
|
||||||
PrintLevelStats(pPlayer, (hud_statscale <= 2 || hud_scale < 70) && double(xdim)/ydim > 1.6? 28 : 56);
|
PrintLevelStats(pPlayer, (hud_statscale <= 0.501f || hud_scale < 70) && double(xdim)/ydim > 1.6? 28 : 56);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@ CUSTOM_CVARD(Int, snd_speech, 1, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enables/disabl
|
||||||
|
|
||||||
// HUD
|
// HUD
|
||||||
|
|
||||||
CUSTOM_CVARD(Int, hud_size, Hud_Stbar, CVAR_ARCHIVE | CVAR_NOINITCALL, "Defines the HUD size and style")
|
CUSTOM_CVARD(Int, hud_size, Hud_Stbar, CVAR_ARCHIVE, "Defines the HUD size and style")
|
||||||
{
|
{
|
||||||
if (self < 0) self = 0;
|
if (self < 0) self = 0;
|
||||||
else if (self > Hud_Nothing) self = Hud_Nothing;
|
else if (self > Hud_Nothing) self = Hud_Nothing;
|
||||||
|
@ -212,10 +212,10 @@ CCMD(sizedown)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CUSTOM_CVARD(Float, hud_statscale, 2, CVAR_ARCHIVE, "change the scale of the stats display")
|
CUSTOM_CVARD(Float, hud_statscale, 0.5, CVAR_ARCHIVE, "change the scale of the stats display")
|
||||||
{
|
{
|
||||||
if (self < 0.5) self = 0.5;
|
if (self < 0.36) self = 0.36;
|
||||||
else if (self > 4) self = 4;
|
else if (self > 1) self = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -708,14 +708,11 @@ void DBaseStatusBar::PrintLevelStats(FLevelStats &stats)
|
||||||
double spacing = stats.spacing * hud_statscale;
|
double spacing = stats.spacing * hud_statscale;
|
||||||
if (stats.screenbottomspace < 0)
|
if (stats.screenbottomspace < 0)
|
||||||
{
|
{
|
||||||
double x = 0, w = 0, h = 0;
|
y = 200 - RelTop - spacing;
|
||||||
y = 200 - RelTop;
|
|
||||||
StatusbarToRealCoords(x, y, w, h);
|
|
||||||
y -= spacing;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
y = (screen->GetHeight() - stats.screenbottomspace * GetHUDScale().Y) - spacing;
|
y = 200 - stats.screenbottomspace - spacing;
|
||||||
}
|
}
|
||||||
|
|
||||||
FString text;
|
FString text;
|
||||||
|
@ -723,7 +720,7 @@ void DBaseStatusBar::PrintLevelStats(FLevelStats &stats)
|
||||||
{
|
{
|
||||||
text.Format(TEXTCOLOR_ESCAPESTR "%cS: " TEXTCOLOR_ESCAPESTR "%c%d/%d",
|
text.Format(TEXTCOLOR_ESCAPESTR "%cS: " TEXTCOLOR_ESCAPESTR "%c%d/%d",
|
||||||
stats.letterColor + 'A', stats.secrets == stats.maxsecrets ? stats.completeColor + 'A' : stats.standardColor + 'A', stats.secrets, stats.maxsecrets);
|
stats.letterColor + 'A', stats.secrets == stats.maxsecrets ? stats.completeColor + 'A' : stats.standardColor + 'A', stats.secrets, stats.maxsecrets);
|
||||||
DrawText(twod, stats.font, CR_UNTRANSLATED, 2 * hud_statscale, y, text, DTA_ScaleX, scale, DTA_ScaleY, scale, TAG_DONE);
|
DrawText(twod, stats.font, CR_UNTRANSLATED, 2 * hud_statscale, y, text, DTA_FullscreenScale, FSMode_Fit320x200, DTA_KeepRatio, true, DTA_ScaleX, scale, DTA_ScaleY, scale, TAG_DONE);
|
||||||
y -= spacing;
|
y -= spacing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -735,12 +732,12 @@ void DBaseStatusBar::PrintLevelStats(FLevelStats &stats)
|
||||||
|
|
||||||
if (text.IsNotEmpty())
|
if (text.IsNotEmpty())
|
||||||
{
|
{
|
||||||
DrawText(twod, stats.font, CR_UNTRANSLATED, 2 * hud_statscale, y, text, DTA_ScaleX, scale, DTA_ScaleY, scale, TAG_DONE);
|
DrawText(twod, stats.font, CR_UNTRANSLATED, 2 * hud_statscale, y, text, DTA_FullscreenScale, FSMode_Fit320x200, DTA_KeepRatio, true, DTA_ScaleX, scale, DTA_ScaleY, scale, TAG_DONE);
|
||||||
y -= spacing;
|
y -= spacing;
|
||||||
}
|
}
|
||||||
|
|
||||||
text.Format(TEXTCOLOR_ESCAPESTR "%cT: " TEXTCOLOR_ESCAPESTR "%c%d:%02d", stats.letterColor+'A', stats.standardColor + 'A', stats.time / 60000, (stats.time % 60000) / 1000);
|
text.Format(TEXTCOLOR_ESCAPESTR "%cT: " TEXTCOLOR_ESCAPESTR "%c%d:%02d", stats.letterColor+'A', stats.standardColor + 'A', stats.time / 60000, (stats.time % 60000) / 1000);
|
||||||
DrawText(twod, stats.font, CR_UNTRANSLATED, 2 * hud_statscale, y, text, DTA_ScaleX, scale, DTA_ScaleY, scale, TAG_DONE);
|
DrawText(twod, stats.font, CR_UNTRANSLATED, 2 * hud_statscale, y, text, DTA_FullscreenScale, FSMode_Fit320x200, DTA_KeepRatio, true, DTA_ScaleX, scale, DTA_ScaleY, scale, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
Loading…
Reference in a new issue