Began creating the listbox widget. It's still just a structure.
[xuni.git] / menu.h
blob68a35eab4077c6094c9e07a5fdb78f0b6f32a6fa
1 #ifndef MENU_H
2 #define MENU_H
4 #include "graphics.h"
6 struct menu_data_t {
7 int loaded;
9 struct {
10 SDL_Surface *image;
11 double x, y;
12 } back0, back1;
14 struct resize_image_t title;
15 int frame_based;
17 struct menu_text_t {
18 struct widget_t widget[6];
19 struct resize_image_t hover[6];
20 struct resize_image_t hoverback;
21 size_t lastid;
22 } gui;
25 void init_menu(struct menu_data_t *data, struct smode_t *smode,
26 struct font_t *font);
27 void start_menu(struct menu_data_t *data);
28 int menu_event(SDL_Surface *screen, enum loop_mode_t *mode, SDL_Event *event,
29 struct menu_data_t *data, struct smode_t *smode, struct font_t *font,
30 struct theme_t *theme);
31 void paint_menu(SDL_Surface *screen, struct menu_data_t *data,
32 struct smode_t *smode, struct font_t *font, struct theme_t *theme);
33 void paint_menu_fps(SDL_Surface *screen, struct font_t *font);
34 void free_menu(struct menu_data_t *data);
36 #endif