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

Method SelectItem

editor/GrListBox.cpp:88–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88void CGrListBox::SelectItem(int item) {
89 // don't do a damn thing if the item selected equals the requested selected item
90 if (item != m_ItemSel) {
91 m_ItemSel = item;
92 OnItemSelected(item);
93 ListBoxProc(false); // update list box data but don't draw yet.
94
95 // scroll window until item wanted is in view.
96 if (m_IsItemSelInBox == false) {
97 // SAMIR: fix this!!
98 int count = 0;
99
100 while (m_ListItem < m_ItemSel && (++count < 100))
101 if (RowDown(1, false))
102 break;
103
104 while (m_ListItem > m_ItemSel && (++count < 100))
105 if (RowUp(1, false))
106 break;
107 }
108
109 CWnd::Invalidate();
110 }
111}
112
113void CGrListBox::SetItemFirst(int item) { m_ListItem = item; }
114

Callers 15

OnNewScriptButtonMethod · 0.45
OnInsertScriptButtonMethod · 0.45
OnRclickEventTreeMethod · 0.45
OnAddScriptMethod · 0.45
ConfirmAfterDeleteMethod · 0.45
ReplaceWithQueryNodeMethod · 0.45
ReplaceWithActionNodeMethod · 0.45
ReplaceWithLogOpNodeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected