#ifndef _INTERFACE_SDL
#define _INTERFACE_SDL

#include "sdl.h"

#define FONT1 "files/fonts/FiraCode-Regular.ttf"
#define FONT2 "files/fonts/FiraCode-Medium.ttf"

enum {
	TEXT_ARRAY_FREE = 1,
	TEXT_ARRAY_SCAN
};

typedef struct {
	TTF_Font *font1;
	TTF_Font *font2;
} FONTS;

typedef struct {
	SDL_Texture *texture;
	SDL_Color color;

	int w;
	int h;

	/* Status of initialization */
	int init;
} TEXT;

int TextArray(TEXT text[], size_t n, char flag);
void PrintText(TTF_Font *font, APP *app, TEXT *dst, const char *text, int flag);
void AddBanner(APP *app, TEXT text, SDL_Rect rect);
void AddPseudoButton(APP *app, TEXT text, const int bttn_num);
void AddDialog(APP *app, TEXT author, TEXT text);
void CloseFonts(FONTS *fonts);
int InitFonts(FONTS *fonts, APP *app);
#endif
