* Changes the string displayed on screen. * @param text Text string. */
| 160 | * @param text Text string. |
| 161 | */ |
| 162 | void Text::setText(const std::wstring &text) |
| 163 | { |
| 164 | _text = text; |
| 165 | processText(); |
| 166 | // If big text won't fit the space, try small text |
| 167 | if (_font == _big && (getTextWidth() > getWidth() || getTextHeight() > getHeight()) && _text[_text.size()-1] != L'.') |
| 168 | { |
| 169 | setSmall(); |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | /** |
| 174 | * Returns the string displayed on screen. |
no outgoing calls