mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-07 20:08:13 +00:00
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:

committed by
Ryan C. Gordon

parent
5608bf5866
commit
1d0e28a5b3
@@ -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! */
|
||||
|
Reference in New Issue
Block a user