snv ignore version.h, add includes for gcc 4.3.3.
[supertux.git] / src / gui / button.cpp
index 4ddaa14..6288665 100644 (file)
 
 #include <config.h>
 
+#include "button.hpp"
+
 #include <SDL.h>
 #include <iostream>
 
 #include "main.hpp"
-#include "button.hpp"
 #include "mousecursor.hpp"
 #include "video/font.hpp"
 #include "video/surface.hpp"
+#include "video/drawing_context.hpp"
 
 Font* Button::info_font = 0;
 extern SDL_Surface* screen;
@@ -63,11 +65,11 @@ if(state == BT_SHOW_INFO)
     offset = Vector(size.x, 0);
   else
     offset = Vector(-30, -size.y/2);
-  context.draw_text(info_font, info, pos + offset, LEFT_ALLIGN, LAYER_GUI+2);
+  context.draw_text(info_font, info, pos + offset, ALIGN_LEFT, LAYER_GUI+2);
   if(binding != 0)
     context.draw_text(info_font, "(" + std::string(SDL_GetKeyName(binding)) +
                                  ")", pos + offset + Vector(0,12),
-                                 LEFT_ALLIGN,  LAYER_GUI+2);
+                                 ALIGN_LEFT,  LAYER_GUI+2);
   }
 
 context.draw_surface_part(image, Vector(0,0), size, pos, LAYER_GUI+1);
@@ -94,7 +96,7 @@ switch(event.type)
         state = BT_SELECTED;
       }
     break;
-  case SDL_KEYDOWN:    // key pressed
+  case SDL_KEYDOWN:        // key pressed
     if(event.key.keysym.sym == binding)
       state = BT_SELECTED;
     break;