MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / GetSelectedIndex

Method GetSelectedIndex

ui/UIListBox.cpp:536–549  ·  view source on GitHub ↗

returns which item index is selected

Source from the content-addressed store, hash-verified

534
535// returns which item index is selected
536int UIListBox::GetSelectedIndex() const {
537 if (m_NumItems == 0)
538 return 0;
539
540 if (m_SelectedIndex < 0)
541 return m_SelectedIndex;
542
543 if (!m_Real2Virt)
544 return 0;
545
546 int virt_index = m_Real2Virt[m_SelectedIndex];
547 ASSERT(virt_index >= 0 && virt_index < m_NumItems);
548 return virt_index;
549}
550
551// sets the selected index.
552void UIListBox::SetSelectedIndex(int index) {

Callers 8

DoMultiAllowedFunction · 0.45
MultiGameOptionsMenuFunction · 0.45
GetCurrentValueMethod · 0.45
UpdateListBoxMethod · 0.45
DoModalMethod · 0.45
ListGetSelectedIndexFunction · 0.45
OldListGetSelectedIndexFunction · 0.45
msn_ShowDownloadChoicesFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected