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

Method initText

src/Interface/TextList.cpp:412–426  ·  view source on GitHub ↗

* Changes the resources for the text in the list * and calculates the selector and visible amount of rows. * @param big Pointer to large-size font. * @param small Pointer to small-size font. * @param lang Pointer to current language. */

Source from the content-addressed store, hash-verified

410 * @param lang Pointer to current language.
411 */
412void TextList::initText(Font *big, Font *small, Language *lang)
413{
414 _big = big;
415 _small = small;
416 _font = small;
417 _lang = lang;
418
419 delete _selector;
420 _selector = new Surface(getWidth(), _font->getHeight() + _font->getSpacing(), getX(), getY());
421 _selector->setPalette(getPalette());
422 _selector->setVisible(false);
423
424 updateVisible();
425
426}
427
428/**
429 * Changes the height of the text list.

Callers 1

addRowMethod · 0.45

Calls 4

getSpacingMethod · 0.80
getHeightMethod · 0.45
setPaletteMethod · 0.45
setVisibleMethod · 0.45

Tested by

no test coverage detected