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

Method setText

src/Interface/Text.cpp:162–171  ·  view source on GitHub ↗

* Changes the string displayed on screen. * @param text Text string. */

Source from the content-addressed store, hash-verified

160 * @param text Text string.
161 */
162void 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.

Callers 15

OptionsAudioStateMethod · 0.45
OptionsVideoStateMethod · 0.45
resizeMethod · 0.45
OptionsDefaultsStateMethod · 0.45
ListGamesStateMethod · 0.45
lstSavesMouseOverMethod · 0.45
lstSavesMouseOutMethod · 0.45
PauseStateMethod · 0.45
createMethod · 0.45
ListLoadStateMethod · 0.45
ListSaveStateMethod · 0.45

Calls

no outgoing calls

Tested by 3

TestStateMethod · 0.36
ResearchCompleteStateMethod · 0.36