diff options
| author | raysan5 <[email protected]> | 2020-08-16 11:28:15 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2020-08-16 11:28:15 +0200 |
| commit | c32ae480afd196d88acdfdb52d5261a61e0deb08 (patch) | |
| tree | f34f662f64424cbade1678c07934b9c12455d68d /examples/core | |
| parent | 26f6a64a39671487f5d1eeeffe7fce6538669051 (diff) | |
| download | raylib-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/core')
| -rw-r--r-- | examples/core/core_input_gamepad.c | 12 | ||||
| -rw-r--r-- | examples/core/core_input_mouse_wheel.c | 2 | ||||
| -rw-r--r-- | examples/core/core_input_multitouch.c | 2 | ||||
| -rw-r--r-- | examples/core/core_random_values.c | 2 | ||||
| -rw-r--r-- | examples/core/core_storage_values.c | 6 | ||||
| -rw-r--r-- | examples/core/core_vr_simulator.c | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/examples/core/core_input_gamepad.c b/examples/core/core_input_gamepad.c index ab4b731a..bf9d219c 100644 --- a/examples/core/core_input_gamepad.c +++ b/examples/core/core_input_gamepad.c @@ -59,7 +59,7 @@ int main(void) if (IsGamepadAvailable(GAMEPAD_PLAYER1)) { - DrawText(FormatText("GP1: %s", GetGamepadName(GAMEPAD_PLAYER1)), 10, 10, 10, BLACK); + DrawText(TextFormat("GP1: %s", GetGamepadName(GAMEPAD_PLAYER1)), 10, 10, 10, BLACK); if (IsGamepadName(GAMEPAD_PLAYER1, XBOX360_NAME_ID)) { @@ -106,8 +106,8 @@ int main(void) DrawRectangle(170, 30, 15, (((1.0f + GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_TRIGGER))/2.0f)*70), RED); DrawRectangle(604, 30, 15, (((1.0f + GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_TRIGGER))/2.0f)*70), RED); - //DrawText(FormatText("Xbox axis LT: %02.02f", GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_TRIGGER)), 10, 40, 10, BLACK); - //DrawText(FormatText("Xbox axis RT: %02.02f", GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_TRIGGER)), 10, 60, 10, BLACK); + //DrawText(TextFormat("Xbox axis LT: %02.02f", GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_TRIGGER)), 10, 40, 10, BLACK); + //DrawText(TextFormat("Xbox axis RT: %02.02f", GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_TRIGGER)), 10, 60, 10, BLACK); } else if (IsGamepadName(GAMEPAD_PLAYER1, PS3_NAME_ID)) { @@ -161,14 +161,14 @@ int main(void) // TODO: Draw generic gamepad } - DrawText(FormatText("DETECTED AXIS [%i]:", GetGamepadAxisCount(GAMEPAD_PLAYER1)), 10, 50, 10, MAROON); + DrawText(TextFormat("DETECTED AXIS [%i]:", GetGamepadAxisCount(GAMEPAD_PLAYER1)), 10, 50, 10, MAROON); for (int i = 0; i < GetGamepadAxisCount(GAMEPAD_PLAYER1); i++) { - DrawText(FormatText("AXIS %i: %.02f", i, GetGamepadAxisMovement(GAMEPAD_PLAYER1, i)), 20, 70 + 20*i, 10, DARKGRAY); + DrawText(TextFormat("AXIS %i: %.02f", i, GetGamepadAxisMovement(GAMEPAD_PLAYER1, i)), 20, 70 + 20*i, 10, DARKGRAY); } - if (GetGamepadButtonPressed() != -1) DrawText(FormatText("DETECTED BUTTON: %i", GetGamepadButtonPressed()), 10, 430, 10, RED); + if (GetGamepadButtonPressed() != -1) DrawText(TextFormat("DETECTED BUTTON: %i", GetGamepadButtonPressed()), 10, 430, 10, RED); else DrawText("DETECTED BUTTON: NONE", 10, 430, 10, GRAY); } else diff --git a/examples/core/core_input_mouse_wheel.c b/examples/core/core_input_mouse_wheel.c index 7c3e2a16..232d62c1 100644 --- a/examples/core/core_input_mouse_wheel.c +++ b/examples/core/core_input_mouse_wheel.c @@ -43,7 +43,7 @@ int main(void) DrawRectangle(screenWidth/2 - 40, boxPositionY, 80, 80, MAROON); DrawText("Use mouse wheel to move the cube up and down!", 10, 10, 20, GRAY); - DrawText(FormatText("Box position Y: %03i", boxPositionY), 10, 40, 20, LIGHTGRAY); + DrawText(TextFormat("Box position Y: %03i", boxPositionY), 10, 40, 20, LIGHTGRAY); EndDrawing(); //---------------------------------------------------------------------------------- diff --git a/examples/core/core_input_multitouch.c b/examples/core/core_input_multitouch.c index 1870b908..a19a3fea 100644 --- a/examples/core/core_input_multitouch.c +++ b/examples/core/core_input_multitouch.c @@ -68,7 +68,7 @@ int main(void) { // Draw circle and touch index number DrawCircleV(touchPosition, 34, ORANGE); - DrawText(FormatText("%d", i), touchPosition.x - 10, touchPosition.y - 70, 40, BLACK); + DrawText(TextFormat("%d", i), touchPosition.x - 10, touchPosition.y - 70, 40, BLACK); } } diff --git a/examples/core/core_random_values.c b/examples/core/core_random_values.c index 52dabe0a..260e708c 100644 --- a/examples/core/core_random_values.c +++ b/examples/core/core_random_values.c @@ -50,7 +50,7 @@ int main(void) DrawText("Every 2 seconds a new random value is generated:", 130, 100, 20, MAROON); - DrawText(FormatText("%i", randValue), 360, 180, 80, LIGHTGRAY); + DrawText(TextFormat("%i", randValue), 360, 180, 80, LIGHTGRAY); EndDrawing(); //---------------------------------------------------------------------------------- diff --git a/examples/core/core_storage_values.c b/examples/core/core_storage_values.c index 1592c059..2ae1cc39 100644 --- a/examples/core/core_storage_values.c +++ b/examples/core/core_storage_values.c @@ -65,10 +65,10 @@ int main(void) ClearBackground(RAYWHITE); - DrawText(FormatText("SCORE: %i", score), 280, 130, 40, MAROON); - DrawText(FormatText("HI-SCORE: %i", hiscore), 210, 200, 50, BLACK); + DrawText(TextFormat("SCORE: %i", score), 280, 130, 40, MAROON); + DrawText(TextFormat("HI-SCORE: %i", hiscore), 210, 200, 50, BLACK); - DrawText(FormatText("frames: %i", framesCounter), 10, 10, 20, LIME); + DrawText(TextFormat("frames: %i", framesCounter), 10, 10, 20, LIME); DrawText("Press R to generate random numbers", 220, 40, 20, LIGHTGRAY); DrawText("Press ENTER to SAVE values", 250, 310, 20, LIGHTGRAY); diff --git a/examples/core/core_vr_simulator.c b/examples/core/core_vr_simulator.c index 76e22b1a..8d24983c 100644 --- a/examples/core/core_vr_simulator.c +++ b/examples/core/core_vr_simulator.c @@ -56,7 +56,7 @@ int main(void) hmd.chromaAbCorrection[3] = 0.0f; // HMD chromatic aberration correction parameter 3 // Distortion shader (uses device lens distortion and chroma) - Shader distortion = LoadShader(0, FormatText("resources/distortion%i.fs", GLSL_VERSION)); + Shader distortion = LoadShader(0, TextFormat("resources/distortion%i.fs", GLSL_VERSION)); SetVrConfiguration(hmd, distortion); // Set Vr device parameters for stereo rendering |
