diff options
| author | raysan5 <raysan5@gmail.com> | 2017-02-05 02:59:39 +0100 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2017-02-05 02:59:39 +0100 |
| commit | 1a879ba08efe1877c26a76bfabd43f282d2b2a97 (patch) | |
| tree | 7870e105ee57aaab20ffd89f5708948960d34460 /examples/text_font_select.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_font_select.c')
| -rw-r--r-- | examples/text_font_select.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/text_font_select.c b/examples/text_font_select.c index fe586db8..5891bef7 100644 --- a/examples/text_font_select.c +++ b/examples/text_font_select.c @@ -41,7 +41,7 @@ int main() const char text[50] = "THIS is THE FONT you SELECTED!"; // Main text - Vector2 textSize = MeasureTextEx(fonts[currentFont], text, fonts[currentFont].size*3, 1); + Vector2 textSize = MeasureTextEx(fonts[currentFont], text, fonts[currentFont].baseSize*3, 1); Vector2 mousePoint; @@ -118,7 +118,7 @@ int main() } // Text measurement for better positioning on screen - textSize = MeasureTextEx(fonts[currentFont], text, fonts[currentFont].size*3, 1); + textSize = MeasureTextEx(fonts[currentFont], text, fonts[currentFont].baseSize*3, 1); //---------------------------------------------------------------------------------- // Draw @@ -140,7 +140,7 @@ int main() DrawText("NEXT", 700, positionY + 13, 20, btnNextOutColor); DrawTextEx(fonts[currentFont], text, (Vector2){ screenWidth/2 - textSize.x/2, - 260 + (70 - textSize.y)/2 }, fonts[currentFont].size*3, + 260 + (70 - textSize.y)/2 }, fonts[currentFont].baseSize*3, 1, colors[currentFont]); EndDrawing(); |
