2017-12-22 15:15:40 +01:00
|
|
|
#ifndef GUI_H_
|
|
|
|
#define GUI_H_
|
|
|
|
|
2018-01-23 14:11:03 +01:00
|
|
|
#define LOG_LINES_COUNT 15
|
|
|
|
#define LOG_FONT_SIZE 8
|
|
|
|
|
2017-12-22 15:15:40 +01:00
|
|
|
#include "linkedlist.h"
|
|
|
|
#include "hashtable.h"
|
|
|
|
#include "sprite.h"
|
|
|
|
#include "camera.h"
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
LinkedList *sprites;
|
|
|
|
LinkedList *health;
|
|
|
|
Hashtable *textures;
|
2018-01-23 14:11:03 +01:00
|
|
|
Texture *log_lines[LOG_LINES_COUNT];
|
2017-12-22 15:15:40 +01:00
|
|
|
} Gui;
|
|
|
|
|
|
|
|
Gui* gui_create(void);
|
|
|
|
|
|
|
|
void gui_set_max_health(Gui*, int max, SDL_Renderer*);
|
|
|
|
|
|
|
|
void gui_set_current_health(Gui*, int current);
|
|
|
|
|
|
|
|
Texture* gui_add_texture(Gui*, const char *path, SDL_Renderer*);
|
|
|
|
|
2018-01-23 12:14:44 +01:00
|
|
|
void gui_render_panel(Gui*, unsigned int width, unsigned int height, Camera*);
|
|
|
|
|
|
|
|
void gui_render_log(Gui*, unsigned int width, unsigned int height, Camera*);
|
2017-12-22 15:15:40 +01:00
|
|
|
|
2018-01-23 22:54:02 +01:00
|
|
|
void gui_log(const char *fmt, ...);
|
2018-01-23 14:11:03 +01:00
|
|
|
|
2017-12-22 15:15:40 +01:00
|
|
|
void gui_destroy(Gui*);
|
|
|
|
|
|
|
|
#endif // GUI_H_
|