modified: CMakeLists.txt
[supertux.git] / src / gui / button.hpp
index f66d868..e0229b4 100644 (file)
@@ -21,8 +21,9 @@
 #include <string>
 
 #include "math/vector.hpp"
+#include "video/font_ptr.hpp"
+#include "video/surface_ptr.hpp"
 
-class Surface;
 class DrawingContext;
 class Font;
 class ButtonGroup;
@@ -37,7 +38,7 @@ enum {
 class Button
 {
 public:
-  Button(Surface* image_, std::string info_, SDLKey binding_);
+  Button(SurfacePtr image_, std::string info_, SDL_Keycode binding_);
   Button(const Button& rhs);
   ~Button();
 
@@ -46,7 +47,7 @@ public:
   void draw(DrawingContext& context, bool selected);
   int event(SDL_Event& event, int x_offset = 0, int y_offset = 0);
 
-  static Font* info_font;
+  static FontPtr info_font;
 
 private:
   friend class ButtonGroup;
@@ -55,8 +56,8 @@ private:
   Vector pos;
   Vector size;
 
-  Surface* image;
-  SDLKey binding;
+  SurfacePtr image;
+  SDL_Keycode binding;
 
   int id;
   int state;