summaryrefslogtreecommitdiffstats
path: root/src/render/Font.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-05-30 21:24:47 +0200
committeraap <aap@papnet.eu>2019-05-30 21:24:47 +0200
commit188aab4196c1d9de0c1bf33be1114e7a0e11fd19 (patch)
treeff0c0a98ced0ba0bbabf34f5f6b1c0e152dcb194 /src/render/Font.cpp
parentfixed ped states (diff)
downloadre3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.tar
re3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.tar.gz
re3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.tar.bz2
re3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.tar.lz
re3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.tar.xz
re3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.tar.zst
re3-188aab4196c1d9de0c1bf33be1114e7a0e11fd19.zip
Diffstat (limited to 'src/render/Font.cpp')
-rw-r--r--src/render/Font.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/render/Font.cpp b/src/render/Font.cpp
index b145bf38..2130fb95 100644
--- a/src/render/Font.cpp
+++ b/src/render/Font.cpp
@@ -341,22 +341,22 @@ CFont::GetTextRect(CRect *rect, float xstart, float ystart, uint16 *s)
if(Details.backgroundOnlyText){
rect->left = xstart - maxlength/2 - 4.0f;
rect->right = xstart + maxlength/2 + 4.0f;
- rect->top = (32.0f * CFont::Details.scaleY * 0.5f + 2.0f * CFont::Details.scaleY) * numLines +
+ rect->bottom = (32.0f * CFont::Details.scaleY * 0.5f + 2.0f * CFont::Details.scaleY) * numLines +
ystart + 2.0f;
- rect->bottom = ystart - 2.0f;
+ rect->top = ystart - 2.0f;
}else{
rect->left = xstart - Details.centreSize*0.5f - 4.0f;
rect->right = xstart + Details.centreSize*0.5f + 4.0f;
- rect->top = (32.0f * CFont::Details.scaleY * 0.5f + 2.0f * CFont::Details.scaleY) * numLines +
+ rect->bottom = (32.0f * CFont::Details.scaleY * 0.5f + 2.0f * CFont::Details.scaleY) * numLines +
ystart + 2.0f;
- rect->bottom = ystart - 2.0f;
+ rect->top = ystart - 2.0f;
}
}else{
rect->left = xstart - 4.0f;
rect->right = Details.wrapX;
// WTF?
- rect->top = ystart - 4.0f + 4.0f;
- rect->bottom = (32.0f * CFont::Details.scaleY * 0.5f + 2.0f * CFont::Details.scaleY) * numLines +
+ rect->bottom = ystart - 4.0f + 4.0f;
+ rect->top = (32.0f * CFont::Details.scaleY * 0.5f + 2.0f * CFont::Details.scaleY) * numLines +
ystart + 2.0f + 2.0f;
}
}