| 197 | // INTERNAL FUNCTIONS |
| 198 | |
| 199 | void CScriptSelect::UpdateScriptListbox() { |
| 200 | CListBox *scrlistbox = (CListBox *)GetDlgItem(IDC_SCRIPTSEL_LISTBOX); |
| 201 | int i; |
| 202 | |
| 203 | GenerateScriptListFromAllFiles(m_CustomType); |
| 204 | |
| 205 | // Add script names to list box |
| 206 | scrlistbox->ResetContent(); |
| 207 | for (i = 0; i < MAX_SCRIPTS; i++) { |
| 208 | if (Script_names[i].used) |
| 209 | if (m_ScriptType == 0xffff || Script_names[i].type == m_ScriptType) |
| 210 | if ((Script_names[i].iscustom && (m_CustomType & CUSTOM_SCRIPT_MASK)) || |
| 211 | (!Script_names[i].iscustom && (m_CustomType & DEFAULT_SCRIPT_MASK))) |
| 212 | scrlistbox->AddString(Script_names[i].name); |
| 213 | } |
| 214 | |
| 215 | scrlistbox->AddString("null"); |
| 216 | |
| 217 | // make sure we reselect the current string. |
| 218 | if (scrlistbox->GetCount() > 0) |
| 219 | scrlistbox->SetCurSel(0); |
| 220 | } |
| 221 | |
| 222 | void CScriptSelect::OnScriptselAdd() { |
| 223 | CAddScriptDialog dlg(this); |
nothing calls this directly
no test coverage detected