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

Method setOptions

src/Interface/ComboBox.cpp:273–283  ·  view source on GitHub ↗

* Changes the list of available options to choose from. * @param options List of string IDs. */

Source from the content-addressed store, hash-verified

271 * @param options List of string IDs.
272 */
273void ComboBox::setOptions(const std::vector<std::string> &options)
274{
275 setDropdown(options.size());
276 _list->clearList();
277 for (std::vector<std::string>::const_iterator i = options.begin(); i != options.end(); ++i)
278 {
279 _list->addRow(1, _lang->getString(*i).c_str());
280 }
281 setSelected(_sel);
282 _list->draw();
283}
284
285/**
286 * Changes the list of available options to choose from.

Callers 6

OptionsAudioStateMethod · 0.80
OptionsVideoStateMethod · 0.80
NewBattleStateMethod · 0.80
OptionsGeoscapeStateMethod · 0.80
TestStateMethod · 0.80

Calls 4

clearListMethod · 0.80
addRowMethod · 0.80
getStringMethod · 0.45
drawMethod · 0.45

Tested by 1

TestStateMethod · 0.64