| 220 | } |
| 221 | |
| 222 | void CScriptSelect::OnScriptselAdd() { |
| 223 | CAddScriptDialog dlg(this); |
| 224 | |
| 225 | // in this case, load the script source file level.scr and add to it. |
| 226 | if (dlg.DoModal() == IDOK) { |
| 227 | char *source; |
| 228 | |
| 229 | source = LoadScript(LEVEL_SCRIPT_NAME); |
| 230 | if (!source) { |
| 231 | OutrageMessageBox("Unable to find script for level. Something is wrong!"); |
| 232 | return; |
| 233 | } |
| 234 | source = AddScriptBlockToScript(source, (LPCSTR)dlg.m_Name, (LPCSTR)dlg.m_TypeName); |
| 235 | SaveScript(LEVEL_SCRIPT_NAME, source); |
| 236 | FreeScript(source); |
| 237 | EditScript(LEVEL_SCRIPT_NAME, dlg.m_Name); |
| 238 | } |
| 239 | } |
| 240 | |
| 241 | void CScriptSelect::OnEditScript() { |
| 242 | CListBox *scrlistbox = (CListBox *)GetDlgItem(IDC_SCRIPTSEL_LISTBOX); |
nothing calls this directly
no test coverage detected