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

Method setSelected

src/Interface/ComboBox.cpp:242–249  ·  view source on GitHub ↗

* Changes the currently selected option. * @param sel Selected row. */

Source from the content-addressed store, hash-verified

240 * @param sel Selected row.
241 */
242void ComboBox::setSelected(size_t sel)
243{
244 _sel = sel;
245 if (_sel < _list->getTexts())
246 {
247 _button->setText(_list->getCellText(_sel, 0));
248 }
249}
250
251/**
252 * Updates the size of the dropdown list based on

Callers 7

OptionsAudioStateMethod · 0.80
OptionsVideoStateMethod · 0.80
loadMethod · 0.80
btnRandomClickMethod · 0.80
OptionsGeoscapeStateMethod · 0.80
mouseClickMethod · 0.80

Calls 3

getTextsMethod · 0.80
getCellTextMethod · 0.80
setTextMethod · 0.45

Tested by

no test coverage detected