little switch() fix
[supertux.git] / src / button.h
1 //
2 // C Interface: button
3 //
4 // Description: 
5 //
6 //
7 // Author: Tobias Glaesser <tobi.web@gmx.de>, (C) 2004
8 //
9 // Copyright: See COPYING file that comes with this distribution
10 //
11 //
12
13 #ifndef SUPERTUX_BUTTON_H
14 #define SUPERTUX_BUTTON_H
15
16 #include "texture.h"
17
18 typedef struct button_type
19   {
20     texture_type icon;
21     char *info;
22     char *text;
23     int x;
24     int y;
25     int w;
26     int h;
27     int state;
28   } button_type;
29   
30 void button_load(button_type* pbutton,char* icon_file, char* text, char* info, int x, int y);
31 void button_draw(button_type* pbutton);
32 void button_free(button_type* pbutton);
33 int button_pressed(button_type* pbutton, int x, int y);
34
35 enum {
36   BN_PRESSED
37 };
38
39 #endif /*SUPERTUX_BUTTON_H*/