Mana
|
A text box, meant to be used inside a scroll area. More...
#include <textbox.h>
Public Member Functions | |
TextBox () | |
void | setTextColor (const gcn::Color *color) |
void | setOutlineColor (const std::optional< gcn::Color > &color) |
void | setTextWrapped (const std::string &text, int minDimension) |
Sets the text after wrapping it to the current width of the widget. | |
int | getMinWidth () const |
Get the minimum text width for the text box. | |
void | draw (gcn::Graphics *graphics) override |
Draws the text. | |
Private Attributes | |
int | mMinWidth |
const gcn::Color * | mTextColor |
std::optional< gcn::Color > | mOutlineColor |
A text box, meant to be used inside a scroll area.
Same as the Guichan text box except this one doesn't have a background or border, instead completely relying on the scroll area.
TextBox::TextBox | ( | ) |
Definition at line 31 of file textbox.cpp.
|
override |
Draws the text.
Overridden so we can customize the color and outline of the text.
Definition at line 158 of file textbox.cpp.
|
inline |
|
inline |
|
inline |
void TextBox::setTextWrapped | ( | const std::string & | text, |
int | minDimension | ||
) |
Sets the text after wrapping it to the current width of the widget.
Definition at line 42 of file textbox.cpp.