summaryrefslogtreecommitdiff
path: root/src/fontcache.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2015-02-01 20:54:24 +0000
committerfrosch <frosch@openttd.org>2015-02-01 20:54:24 +0000
commita8080b62563dcb9f3e3bf5180ebf2de6cf6b68ae (patch)
tree3ac628ab264823257073f281ce7e692f07e5c651 /src/fontcache.cpp
parent3bc7ee3ab731c7a855f811b36356ed907b42989a (diff)
downloadopenttd-a8080b62563dcb9f3e3bf5180ebf2de6cf6b68ae.tar.xz
(svn r27134) -Codechange: Simplify GUI scaling by adding UnScaleGUI() and ScaleGUITrad().
Diffstat (limited to 'src/fontcache.cpp')
-rw-r--r--src/fontcache.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fontcache.cpp b/src/fontcache.cpp
index e6f1e3725..4928b5377 100644
--- a/src/fontcache.cpp
+++ b/src/fontcache.cpp
@@ -183,12 +183,12 @@ uint SpriteFontCache::GetGlyphWidth(GlyphID key)
{
SpriteID sprite = this->GetUnicodeGlyph(key);
if (sprite == 0) sprite = this->GetUnicodeGlyph('?');
- return SpriteExists(sprite) ? GetSprite(sprite, ST_FONT)->width + UnScaleByZoom(4 * (this->fs != FS_NORMAL), ZOOM_LVL_GUI) : 0;
+ return SpriteExists(sprite) ? GetSprite(sprite, ST_FONT)->width + ScaleGUITrad(this->fs != FS_NORMAL ? 1 : 0) : 0;
}
int SpriteFontCache::GetHeight() const
{
- return UnScaleByZoom(4 * this->height, ZOOM_LVL_GUI);
+ return ScaleGUITrad(this->height);
}
bool SpriteFontCache::GetDrawGlyphShadow()