diff options
| author | raysan5 <[email protected]> | 2017-02-05 02:59:39 +0100 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2017-02-05 02:59:39 +0100 |
| commit | 1a879ba08efe1877c26a76bfabd43f282d2b2a97 (patch) | |
| tree | 7870e105ee57aaab20ffd89f5708948960d34460 /examples/text_bmfont_ttf.c | |
| parent | a08117155da1a0a439239ad8801a58b85f528014 (diff) | |
| download | raylib-1a879ba08efe1877c26a76bfabd43f282d2b2a97.tar.gz raylib-1a879ba08efe1877c26a76bfabd43f282d2b2a97.zip | |
Refactor SpriteFont struct
Now it uses CharInfo data, this way, it's better aligned with the future
RRES file format data layout for sprite font characters.
Diffstat (limited to 'examples/text_bmfont_ttf.c')
| -rw-r--r-- | examples/text_bmfont_ttf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/text_bmfont_ttf.c b/examples/text_bmfont_ttf.c index caece548..4d060915 100644 --- a/examples/text_bmfont_ttf.c +++ b/examples/text_bmfont_ttf.c @@ -29,8 +29,8 @@ int main() Vector2 fontPosition; - fontPosition.x = screenWidth/2 - MeasureTextEx(fontBm, msgBm, fontBm.size, 0).x/2; - fontPosition.y = screenHeight/2 - fontBm.size/2 - 80; + fontPosition.x = screenWidth/2 - MeasureTextEx(fontBm, msgBm, fontBm.baseSize, 0).x/2; + fontPosition.y = screenHeight/2 - fontBm.baseSize/2 - 80; SetTargetFPS(60); //-------------------------------------------------------------------------------------- @@ -49,8 +49,8 @@ int main() ClearBackground(RAYWHITE); - DrawTextEx(fontBm, msgBm, fontPosition, fontBm.size, 0, MAROON); - DrawTextEx(fontTtf, msgTtf, (Vector2){ 75.0f, 240.0f }, fontTtf.size*0.8f, 2, LIME); + DrawTextEx(fontBm, msgBm, fontPosition, fontBm.baseSize, 0, MAROON); + DrawTextEx(fontTtf, msgTtf, (Vector2){ 75.0f, 240.0f }, fontTtf.baseSize*0.8f, 2, LIME); EndDrawing(); //---------------------------------------------------------------------------------- |
