- replaced YES/NO with true/false
[supertux.git] / src / button.h
index dff208a..ee86dfe 100644 (file)
 
 #include "texture.h"
 
-enum {
-  BN_CLICKED,
-  BN_PRESSED,
-  BN_HOVER
+enum ButtonState {
+  BUTTON_NONE = -1,
+  BUTTON_CLICKED,
+  BUTTON_PRESSED,
+  BUTTON_HOVER
 };
 
 typedef struct button_type
@@ -27,23 +28,23 @@ typedef struct button_type
     texture_type* bkgd;
     char *info;
     SDLKey shortcut;
-    int x;
-    int y;
-    int w;
-    int h;
-    int show_info;
-    int state;
+    int  x;
+    int  y;
+    int  w;
+    int  h;
+    bool show_info;
+    ButtonState state;
     int tag;
   }
 button_type;
 
 void button_load(button_type* pbutton,char* icon_file, char* info, SDLKey shortcut, int x, int y);
 button_type* button_create(char* icon_file, char* info, SDLKey shortcut, int x, int y);
-button_type* button_change_icon(button_type* pbutton,char* icon_file);
+void button_change_icon(button_type* pbutton,char* icon_file);
 void button_draw(button_type* pbutton);
 void button_free(button_type* pbutton);
 void button_event(button_type* pbutton, SDL_Event* event);
-int button_get_state(button_type* pbutton);
+int  button_get_state(button_type* pbutton);
 
 typedef struct button_panel_type
   {