Add current level to another debug message
[supertux.git] / src / supertux / textscroller.hpp
index fca80d7..e77f688 100644 (file)
 
 #include "supertux/screen.hpp"
 #include "video/color.hpp"
+#include "video/surface_ptr.hpp"
 
 class DrawingContext;
-class Surface;
 class Font;
-
-/**
- * Helper class for InfoBox: Represents a line of text
- */
-class InfoBoxLine
-{
-public:
-  enum LineType { NORMAL, NORMAL_LEFT, SMALL, HEADING, REFERENCE, IMAGE};
-
-  InfoBoxLine(char format_char, const std::string& text);
-  ~InfoBoxLine();
-
-  void draw(DrawingContext& context, const Rect& bbox, int layer);
-  float get_height();
-
-  static const std::vector<InfoBoxLine*> split(const std::string& text, float width);
-
-private:
-  InfoBoxLine::LineType lineType;
-  Font* font;
-  Color color;
-  std::string text;
-  Surface* image;
-
-private:
-  InfoBoxLine(const InfoBoxLine&);
-  InfoBoxLine& operator=(const InfoBoxLine&);
-};
-
-/** This class is displaying a box with information text inside the game
- */
-class InfoBox
-{
-public:
-  InfoBox(const std::string& text);
-  ~InfoBox();
-
-  void draw(DrawingContext& context);
-  void scrolldown();
-  void scrollup();
-  void pagedown();
-  void pageup();
-
-private:
-  size_t firstline;
-  std::vector<InfoBoxLine*> lines;
-  std::map<std::string, Surface*> images;
-  Surface* arrow_scrollup;
-  Surface* arrow_scrolldown;
-
-private:
-  InfoBox(const InfoBox&);
-  InfoBox& operator=(const InfoBox&);
-};
+class InfoBoxLine;
 
 /**
  * Screen that displays intro text, extro text, etc.
@@ -103,7 +50,7 @@ private:
   float defaultspeed;
   float speed;
   std::string music;
-  std::auto_ptr<Surface> background;
+  SurfacePtr background;
   std::vector<InfoBoxLine*> lines;
   float scroll;
   bool fading;