diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2020-12-20 05:49:55 +0300 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2020-12-20 05:49:55 +0300 |
commit | ae7cb924379b628ee6da1b6bceee8f1a85376d24 (patch) | |
tree | 1f616c4bbaf302834e19b439152d3e3a9969f853 /src/render/Hud.cpp | |
parent | 0bea6d039ba092a2c8677fdf52bf4fc6a6eeb3e3 (diff) |
fixes to last HUD commits
Diffstat (limited to 'src/render/Hud.cpp')
-rw-r--r-- | src/render/Hud.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/render/Hud.cpp b/src/render/Hud.cpp index eb152ca4..dcc703e9 100644 --- a/src/render/Hud.cpp +++ b/src/render/Hud.cpp @@ -516,9 +516,9 @@ void CHud::Draw() Sprites[WeaponType].Draw( CRect( - SCREEN_WIDTH-SCREEN_SCALE_X(WEAPON_X), + SCREEN_SCALE_FROM_RIGHT(WEAPON_X), SCREEN_SCALE_Y(27.0f), - SCREEN_WIDTH-SCREEN_SCALE_X(WEAPON_X)+SCREEN_SCALE_X(64.0f), + SCREEN_SCALE_FROM_RIGHT(WEAPON_X)+SCREEN_SCALE_X(64.0f), SCREEN_SCALE_Y(27.0f)+SCREEN_SCALE_Y(64.0f)), CRGBA(255, 255, 255, 255), 0.015f, @@ -1029,7 +1029,7 @@ void CHud::Draw() CFont::SetRightJustifyWrap(0.0f); CFont::SetFontStyle(FONT_LOCALE(FONT_HEADING)); CFont::SetColor(CRGBA(244, 20, 20, 255)); - CFont::SetWrapx(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH)); + CFont::SetWrapx(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH)); CFont::SetPropOff(); CFont::SetBackGroundOnlyTextOn(); @@ -1171,7 +1171,7 @@ void CHud::Draw() CFont::SetRightJustifyOff(); CFont::SetBackgroundOff(); CFont::SetCentreOff(); - CFont::SetWrapx(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH)); + CFont::SetWrapx(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH)); CFont::SetJustifyOff(); CFont::SetPropOff(); CFont::SetFontStyle(FONT_PAGER); @@ -1809,7 +1809,12 @@ void CHud::DrawAfterFade() CFont::SetScale(SCREEN_SCALE_X(1.0f), SCREEN_SCALE_Y(1.2f)); CFont::SetCentreOn(); CFont::SetPropOn(); - CFont::SetCentreSize(SCREEN_WIDTH-SCREEN_SCALE_X(20.0f)); + // Not bug, we just want these kind of texts to be wrapped at the center. +#ifdef ASPECT_RATIO_SCALE + CFont::SetCentreSize(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH - 20.0f)); +#else + CFont::SetCentreSize(SCREEN_SCALE_FROM_RIGHT(20.0f)); +#endif CFont::SetColor(CRGBA(0, 0, 0, 255)); CFont::SetFontStyle(FONT_LOCALE(FONT_BANK)); |