From a210be6a8fb168dd44fb371cf7dea932dea0a3e3 Mon Sep 17 00:00:00 2001 From: Iftikhar Ahmed Date: Sat, 30 Dec 2023 21:25:34 -0700 Subject: [PATCH] Created an overloaded function of DrawFps(rtext.c) in which user can choose FPS color rather than it being automatic --- src/rtext.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rtext.c b/src/rtext.c index 4ead02ca7..edb38070a 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -1089,6 +1089,11 @@ void DrawFPS(int posX, int posY) DrawText(TextFormat("%2i FPS", fps), posX, posY, 20, color); } +void DrawFPS(int posX, int posY, Color color) +{ + int fps = GetFPS(); + DrawText(TextFormat("%2i FPS", fps), posX, posY, 20, color); // Draw FPS based on single color +} // Draw text (using default font) // NOTE: fontSize work like in any drawing program but if fontSize is lower than font-base-size, then font-base-size is used