Add SDL_RenderDebugTextF & SDL_RenderDebugTextV

This should make it easier to quickly put important numbers and such on
the screen without having to format them into a string manually.
This commit is contained in:
williamistGitHub authored and Ryan C. Gordon committed 2024-12-18 10:40:31 -05:00
1 parent 5608bf5866
commit 1d0e28a5b3
8 files changed
+126 -2

No files matched your search

@@ -62,6 +62,9 @@ SDL_AppResult SDL_AppIterate(void *appstate)
SDL_RenderDebugText(renderer, 14, 65, "It can be scaled.");
SDL_SetRenderScale(renderer, 1.0f, 1.0f);
SDL_RenderDebugText(renderer, 64, 350, "This only does ASCII chars. So this laughing emoji won't draw: 🤣");
SDL_RenderDebugTextF(renderer, 0, 0, "This program has been running for %llu seconds.", SDL_GetTicks() / 1000);
SDL_RenderPresent(renderer); /* put it all on the screen! */
return SDL_APP_CONTINUE; /* carry on with the program! */