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

Method SelectItem

ui/UICombo.cpp:114–123  ·  view source on GitHub ↗

selects the given item in the list.

Source from the content-addressed store, hash-verified

112
113// selects the given item in the list.
114void UIComboBox::SelectItem(const UIItem *item) {
115 int i;
116
117 for (i = 0; i < m_nItems; i++) {
118 if (item == m_ItemList[i]) {
119 SetSelectedIndex(i);
120 break;
121 }
122 }
123}
124
125// returns the item at listbox index given.
126UIItem *UIComboBox::GetItem(int index) const { return (index < m_nItems) ? m_ItemList[index] : NULL; }

Callers 3

MultiGameOptionsMenuFunction · 0.45
ListSelectItemFunction · 0.45
OldListSelectItemFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected