Fix crash on ESC press when no music is playing
[supertux.git] / src / supertux / info_box_line.hpp
index 3501229..56c6bca 100644 (file)
 #include <memory>
 
 #include "video/color.hpp"
+#include "video/font_ptr.hpp"
+#include "video/surface_ptr.hpp"
 
 class DrawingContext;
-class Font;
-class Rect;
-class Surface;
+class Rectf;
 
 /**
  * Helper class for InfoBox: Represents a line of text
@@ -39,17 +39,17 @@ public:
   InfoBoxLine(char format_char, const std::string& text);
   ~InfoBoxLine();
 
-  void draw(DrawingContext& context, const Rect& bbox, int layer);
+  void draw(DrawingContext& context, const Rectf& bbox, int layer);
   float get_height();
 
   static const std::vector<InfoBoxLine*> split(const std::string& text, float width);
 
 private:
   InfoBoxLine::LineType lineType;
-  Font* font;
+  FontPtr font;
   Color color;
   std::string text;
-  std::auto_ptr<Surface> image;
+  SurfacePtr image;
 
 private:
   InfoBoxLine(const InfoBoxLine&);