MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / addLine

Method addLine

src/Menu/StartState.cpp:287–295  ·  view source on GitHub ↗

* Adds a line of text to the terminal and moves * the cursor appropriately. * @param str Text line to add. */

Source from the content-addressed store, hash-verified

285 * @param str Text line to add.
286 */
287void 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.

Callers

nothing calls this directly

Calls 6

getTextHeightMethod · 0.80
getTextWidthMethod · 0.80
setTextMethod · 0.45
getHeightMethod · 0.45
setXMethod · 0.45
setYMethod · 0.45

Tested by

no test coverage detected