projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved SDL_Surface optimizer to handle images that have fairly constant alpha and...
[supertux.git]
/
src
/
textscroller.hpp
diff --git
a/src/textscroller.hpp
b/src/textscroller.hpp
index
5198eb9
..
cc166dc
100644
(file)
--- a/
src/textscroller.hpp
+++ b/
src/textscroller.hpp
@@
-27,6
+27,7
@@
#include "screen.hpp"
#include "math/vector.hpp"
#include "screen.hpp"
#include "math/vector.hpp"
+#include "math/rect.hpp"
class DrawingContext;
class Surface;
class DrawingContext;
class Surface;
@@
-37,21
+38,22
@@
class Font;
*/
class InfoBoxLine
{
*/
class InfoBoxLine
{
-p
rivate
:
+p
ublic
:
enum LineType { NORMAL, NORMAL_LEFT, SMALL, HEADING, REFERENCE, IMAGE};
enum LineType { NORMAL, NORMAL_LEFT, SMALL, HEADING, REFERENCE, IMAGE};
- LineType lineType;
- Font* font;
- std::string text;
- Surface* image;
-public:
InfoBoxLine(char format_char, const std::string& text);
~InfoBoxLine();
InfoBoxLine(char format_char, const std::string& text);
~InfoBoxLine();
- void draw(DrawingContext& context, const
Vector& position
, int layer);
+ void draw(DrawingContext& context, const
Rect& bbox
, int layer);
float get_height();
float get_height();
- static const std::vector<InfoBoxLine*> split(const std::string& text, int line_length);
+ static const std::vector<InfoBoxLine*> split(const std::string& text, float width);
+
+private:
+ InfoBoxLine::LineType lineType;
+ Font* font;
+ std::string text;
+ Surface* image;
};
/** This class is displaying a box with information text inside the game
};
/** This class is displaying a box with information text inside the game