22 #ifndef ULTIMA8_GUMPS_WIDGETS_TEXTWIDGET_H 23 #define ULTIMA8_GUMPS_WIDGETS_TEXTWIDGET_H 29 #include "ultima/ultima8/gumps/gump.h" 30 #include "ultima/ultima8/gfx/fonts/font.h" 31 #include "ultima/ultima8/misc/classtype.h" 50 int32 _targetWidth, _targetHeight;
53 Font::TextAlign _textAlign;
55 ENABLE_RUNTIME_CLASSTYPE()
58 TextWidget(
int x,
int y, const
Std::
string &txt,
bool gamefont,
int fontnum,
59 int width = 0,
int height = 0,
61 bool dopaging = false);
65 void InitGump(
Gump *newparent,
bool take_focus = true) override;
70 void PaintComposited(RenderSurface *surf, int32 lerp_factor, int32 scalex, int32 scaley) override;
72 Gump *onMouseMotion(int32 mx, int32 my) override;
104 Font *getFont()
const;
int getVlead()
get the RenderedText's vlead
TextAlign
Definition: font.h:48
void PaintThis(RenderSurface *, int32 lerp_factor, bool scaled) override
Overloadable method to Paint just this Gump (RenderSurface is relative to this)
void InitGump(Gump *newparent, bool take_focus=true) override
Definition: render_surface.h:40
Definition: rendered_text.h:30
Definition: detection.h:27
unsigned int _currentEnd
start of remaining text
Definition: text_widget.h:48
void getCurrentText(unsigned int &start, unsigned int &end) const
Definition: text_widget.h:84
unsigned int _currentStart
start of currently displaying text
Definition: text_widget.h:47
void PaintComposited(RenderSurface *surf, int32 lerp_factor, int32 scalex, int32 scaley) override
Overloadable method to Paint just this gumps unscaled components that require compositing (RenderSurf...
Definition: text_widget.h:38
void setBlendColour(uint32 col)
set the colour to blend the rendered text with. (0 to disable)
Definition: text_widget.h:90
void rewind()
reset the widget to the start of the text
Definition: algorithm.h:37