returns which item index is selected
| 534 | |
| 535 | // returns which item index is selected |
| 536 | int 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. |
| 552 | void UIListBox::SetSelectedIndex(int index) { |
no outgoing calls
no test coverage detected