22 #ifndef NANCY_MISC_HYPERTEXT_H 23 #define NANCY_MISC_HYPERTEXT_H 25 #include "engines/nancy/renderobject.h" 26 #include "engines/nancy/graphics.h" 40 _highlightBackgroundColor(0),
43 _needsTextRedraw(
false),
45 _imageVerticalOffset(0) {}
48 bool hasBeenDrawn()
const {
return !_needsTextRedraw; }
51 enum Justification { kJustifyLeft, kJustifyRight, kJustifyCenter };
59 void initSurfaces(uint width, uint height,
const struct Graphics::PixelFormat &format, uint32 backgroundColor, uint32 highlightBackgroundColor);
65 void drawAllText(
const Common::Rect &textBounds, uint leftOffsetNonNewline, uint fontID, uint highlightFontID);
68 void drawInlineImage(
const InlineImage &inlineImage,
const Common::Rect &textBounds, uint horizontalOffset, uint justification,
const Font *font);
72 void setDefaultTextRGB(byte r, byte g, byte b);
77 uint32 _backgroundColor;
78 uint32 _highlightBackgroundColor;
79 uint _defaultTextColor;
80 uint _defaultJustification = kJustifyLeft;
81 FontColorState _fontColorState = kFontColorNormal;
82 int _imageVerticalOffset;
90 bool _recordMarkHotspots =
false;
98 uint16 _numDrawnLines;
99 uint16 _drawnTextHeight;
100 bool _needsTextRedraw;
104 static const int kDefaultRGB = -1;
107 uint32 getColorPixel(
const Font *font,
int colorID)
const;
109 bool _hasDefaultTextRGB =
false;
110 byte _defaultTextRGB[3] = {};
116 #endif // NANCY_MISC_HYPERTEXT_H Definition: managed_surface.h:51
Definition: hypertext.h:36
Definition: hypertext.h:54
Definition: actionmanager.h:32