#include <menu.h>
Public Member Functions | |
TextItem () | |
virtual | ~TextItem () |
virtual void | set_bounds (const coord_def &min_coord, const coord_def &max_coord) |
virtual void | set_bounds_no_multiply (const coord_def &min_coord, const coord_def &max_coord) |
virtual void | render () |
void | set_text (const std::string &text) |
const std::string & | get_text () const |
Protected Member Functions | |
void | _wrap_text () |
Protected Attributes | |
std::string | m_text |
std::string | m_render_text |
TextItem::TextItem | ( | ) |
TextItem::~TextItem | ( | ) | [virtual] |
Rewrap the text if bounds changes
Reimplemented from MenuItem.
void TextItem::set_bounds_no_multiply | ( | const coord_def & | min_coord, | |
const coord_def & | max_coord | |||
) | [virtual] |
Rewrap the text if bounds changes
Reimplemented from MenuItem.
void TextItem::render | ( | ) | [virtual] |
void TextItem::set_text | ( | const std::string & | text | ) |
const std::string & TextItem::get_text | ( | ) | const |
void TextItem::_wrap_text | ( | ) | [protected] |
Wraps and chops the m_text variable and saves the chopped text to m_render_text. This is done to preserve the old text in case the text item changes size and could fit more text Override if you use font with different sizes than CRTRegion font
std::string TextItem::m_text [protected] |
std::string TextItem::m_render_text [protected] |