This repository has been archived on 2026-04-25. You can view files and clone it, but cannot push or open issues or pull requests.
Blokos/src/app/text.h

26 lines
462 B
C
Raw Normal View History

2024-05-08 12:37:48 -05:00
// Define once
#ifndef H_TEXT
#define H_TEXT
// Files
// --SYSTEM
#include <stdbool.h>
// --SDL
#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>
// Structures
typedef struct PX_Text{
TTF_Font* font;
SDL_Surface* surface;
SDL_Texture* texture;
int width;
} PX_Text;
// Functions
PX_Text px_TextCreate(SDL_Renderer* renderer, const char* msg);
void px_TextDraw(SDL_Renderer* renderer, PX_Text text, int x, int y, int w, int h);
// End if
#endif