summaryrefslogtreecommitdiffhomepage
path: root/examples/text
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2020-08-16 11:28:15 +0200
committerraysan5 <[email protected]>2020-08-16 11:28:15 +0200
commitc32ae480afd196d88acdfdb52d5261a61e0deb08 (patch)
treef34f662f64424cbade1678c07934b9c12455d68d /examples/text
parent26f6a64a39671487f5d1eeeffe7fce6538669051 (diff)
downloadraylib-c32ae480afd196d88acdfdb52d5261a61e0deb08.tar.gz
raylib-c32ae480afd196d88acdfdb52d5261a61e0deb08.zip
RENAMED: FormatText() -> TextFormat()
This function was renamed for consistency in raylib 3.0, just unified all examples to use TextFormat() instead of FormatText()
Diffstat (limited to 'examples/text')
-rw-r--r--examples/text/text_font_filters.c4
-rw-r--r--examples/text/text_font_sdf.c4
-rw-r--r--examples/text/text_format_text.c8
-rw-r--r--examples/text/text_input_box.c2
4 files changed, 9 insertions, 9 deletions
diff --git a/examples/text/text_font_filters.c b/examples/text/text_font_filters.c
index 60b16a04..d90c4277 100644
--- a/examples/text/text_font_filters.c
+++ b/examples/text/text_font_filters.c
@@ -109,8 +109,8 @@ int main(void)
//DrawRectangleLines(fontPosition.x, fontPosition.y, textSize.x, textSize.y, RED);
DrawRectangle(0, screenHeight - 80, screenWidth, 80, LIGHTGRAY);
- DrawText(FormatText("Font size: %02.02f", fontSize), 20, screenHeight - 50, 10, DARKGRAY);
- DrawText(FormatText("Text size: [%02.02f, %02.02f]", textSize.x, textSize.y), 20, screenHeight - 30, 10, DARKGRAY);
+ DrawText(TextFormat("Font size: %02.02f", fontSize), 20, screenHeight - 50, 10, DARKGRAY);
+ DrawText(TextFormat("Text size: [%02.02f, %02.02f]", textSize.x, textSize.y), 20, screenHeight - 30, 10, DARKGRAY);
DrawText("CURRENT TEXTURE FILTER:", 250, 400, 20, GRAY);
if (currentFontFilter == 0) DrawText("POINT", 570, 400, 20, BLACK);
diff --git a/examples/text/text_font_sdf.c b/examples/text/text_font_sdf.c
index 2cbe5150..2be4a068 100644
--- a/examples/text/text_font_sdf.c
+++ b/examples/text/text_font_sdf.c
@@ -55,7 +55,7 @@ int main(void)
UnloadImage(atlas);
// Load SDF required shader (we use default vertex shader)
- Shader shader = LoadShader(0, FormatText("resources/shaders/glsl%i/sdf.fs", GLSL_VERSION));
+ Shader shader = LoadShader(0, TextFormat("resources/shaders/glsl%i/sdf.fs", GLSL_VERSION));
SetTextureFilter(fontSDF.texture, FILTER_BILINEAR); // Required for SDF font
Vector2 fontPosition = { 40, screenHeight/2 - 50 };
@@ -110,7 +110,7 @@ int main(void)
else DrawText("default font", 315, 40, 30, GRAY);
DrawText("FONT SIZE: 16.0", GetScreenWidth() - 240, 20, 20, DARKGRAY);
- DrawText(FormatText("RENDER SIZE: %02.02f", fontSize), GetScreenWidth() - 240, 50, 20, DARKGRAY);
+ DrawText(TextFormat("RENDER SIZE: %02.02f", fontSize), GetScreenWidth() - 240, 50, 20, DARKGRAY);
DrawText("Use MOUSE WHEEL to SCALE TEXT!", GetScreenWidth() - 240, 90, 10, DARKGRAY);
DrawText("HOLD SPACE to USE SDF FONT VERSION!", 340, GetScreenHeight() - 30, 20, MAROON);
diff --git a/examples/text/text_format_text.c b/examples/text/text_format_text.c
index a9f04176..63408eb9 100644
--- a/examples/text/text_format_text.c
+++ b/examples/text/text_format_text.c
@@ -41,13 +41,13 @@ int main(void)
ClearBackground(RAYWHITE);
- DrawText(FormatText("Score: %08i", score), 200, 80, 20, RED);
+ DrawText(TextFormat("Score: %08i", score), 200, 80, 20, RED);
- DrawText(FormatText("HiScore: %08i", hiscore), 200, 120, 20, GREEN);
+ DrawText(TextFormat("HiScore: %08i", hiscore), 200, 120, 20, GREEN);
- DrawText(FormatText("Lives: %02i", lives), 200, 160, 40, BLUE);
+ DrawText(TextFormat("Lives: %02i", lives), 200, 160, 40, BLUE);
- DrawText(FormatText("Elapsed Time: %02.02f ms", GetFrameTime()*1000), 200, 220, 20, BLACK);
+ DrawText(TextFormat("Elapsed Time: %02.02f ms", GetFrameTime()*1000), 200, 220, 20, BLACK);
EndDrawing();
//----------------------------------------------------------------------------------
diff --git a/examples/text/text_input_box.c b/examples/text/text_input_box.c
index 981ae80d..650ca207 100644
--- a/examples/text/text_input_box.c
+++ b/examples/text/text_input_box.c
@@ -86,7 +86,7 @@ int main(void)
DrawText(name, textBox.x + 5, textBox.y + 8, 40, MAROON);
- DrawText(FormatText("INPUT CHARS: %i/%i", letterCount, MAX_INPUT_CHARS), 315, 250, 20, DARKGRAY);
+ DrawText(TextFormat("INPUT CHARS: %i/%i", letterCount, MAX_INPUT_CHARS), 315, 250, 20, DARKGRAY);
if (mouseOnText)
{