mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-24 21:49:10 +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:
parent
5608bf5866
commit
1d0e28a5b3
8 changed files with 126 additions and 2 deletions
|
@ -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! */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue