summaryrefslogtreecommitdiffhomepage
path: root/examples/web/core/core_input_gamepad.c
diff options
context:
space:
mode:
authorRay <[email protected]>2021-03-12 18:05:09 +0100
committerRay <[email protected]>2021-03-12 18:05:09 +0100
commit421c4e4cd85310bef3a8f79f89d23e3a1eac9668 (patch)
treea49167a3f2c2ae7558c9a3a94696bc187ffbc824 /examples/web/core/core_input_gamepad.c
parentcc62fcccc630fdc4badcad8381d5bb43eb71fa1f (diff)
downloadraylib.com-421c4e4cd85310bef3a8f79f89d23e3a1eac9668.tar.gz
raylib.com-421c4e4cd85310bef3a8f79f89d23e3a1eac9668.zip
Renamed FormatText() -> TextFormat()
Diffstat (limited to 'examples/web/core/core_input_gamepad.c')
-rw-r--r--examples/web/core/core_input_gamepad.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/web/core/core_input_gamepad.c b/examples/web/core/core_input_gamepad.c
index 3485391..ca90ba1 100644
--- a/examples/web/core/core_input_gamepad.c
+++ b/examples/web/core/core_input_gamepad.c
@@ -98,7 +98,7 @@ void UpdateDrawFrame(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))
{
@@ -145,8 +145,8 @@ void UpdateDrawFrame(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))
{
@@ -200,14 +200,14 @@ void UpdateDrawFrame(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