* Adds a line of text to the terminal and moves * the cursor appropriately. * @param str Text line to add. */
| 285 | * @param str Text line to add. |
| 286 | */ |
| 287 | void StartState::addLine(const std::wstring &str) |
| 288 | { |
| 289 | _output << L"\n" << str; |
| 290 | _text->setText(_output.str()); |
| 291 | int y = _text->getTextHeight() - _font->getHeight(); |
| 292 | int x = _text->getTextWidth(y / _font->getHeight()); |
| 293 | _cursor->setX(x); |
| 294 | _cursor->setY(y); |
| 295 | } |
| 296 | |
| 297 | /** |
| 298 | * Loads game data and updates status accordingly. |
nothing calls this directly
no test coverage detected