diff options
| author | victorfisac <[email protected]> | 2017-04-03 20:31:10 +0200 |
|---|---|---|
| committer | victorfisac <[email protected]> | 2017-04-03 20:31:10 +0200 |
| commit | 256bc6e1dccfd021239dd0e5a66c377a402c3c59 (patch) | |
| tree | c0baef923b5c60128e7fc76d50eb85982e1ba725 /docs/examples/web/text_font_select.c | |
| parent | 0d06c946f2a6b7ce0eb374159333872392a707d9 (diff) | |
| parent | e6ed85e993b049a28dcc3c37bd5fadc6ab159df7 (diff) | |
| download | raylib-256bc6e1dccfd021239dd0e5a66c377a402c3c59.tar.gz raylib-256bc6e1dccfd021239dd0e5a66c377a402c3c59.zip | |
Merge remote-tracking branch 'refs/remotes/raysan5/develop' into develop
Diffstat (limited to 'docs/examples/web/text_font_select.c')
| -rw-r--r-- | docs/examples/web/text_font_select.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/examples/web/text_font_select.c b/docs/examples/web/text_font_select.c index f8827503..0984bbdd 100644 --- a/docs/examples/web/text_font_select.c +++ b/docs/examples/web/text_font_select.c @@ -77,7 +77,7 @@ int main() fontNames = tempFontNames; - textSize = MeasureTextEx(fonts[currentFont], text, fonts[currentFont].size*3, 1); + textSize = MeasureTextEx(fonts[currentFont], text, fonts[currentFont].baseSize*3, 1); btnNextRec = (Rectangle){ 673, positionY, 109, 44 }; // Button rectangle (useful for collision) @@ -166,7 +166,7 @@ void UpdateDrawFrame(void) } // 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 @@ -188,7 +188,7 @@ void UpdateDrawFrame(void) 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(); |
