| 506 | // ComboBox |
| 507 | |
| 508 | void CScriptWizard::LoadCurrentModule() { |
| 509 | CComboBox *modcbox = (CComboBox *)GetDlgItem(IDC_SCRMOD_BOX); |
| 510 | char str[MAX_SCRNAME]; |
| 511 | |
| 512 | // Get current module select and load it in. |
| 513 | if (m_ScriptSource) |
| 514 | FreeScript(m_ScriptSource); |
| 515 | |
| 516 | m_ScriptSource = NULL; |
| 517 | |
| 518 | if (modcbox->GetLBText(modcbox->GetCurSel(), str) != CB_ERR) { |
| 519 | char *ptr; |
| 520 | m_ScriptSource = LoadScript(str); |
| 521 | strcpy(ScriptFileName, str); |
| 522 | strcpy(ScriptCodeName, str); |
| 523 | ptr = strtok(ScriptCodeName, "."); |
| 524 | strcat(ptr, ".d3x"); |
| 525 | } |
| 526 | |
| 527 | // new script file, set current script to 0 |
| 528 | m_CurScriptSel = 0; |
| 529 | |
| 530 | // compile and generate list of script names. |
| 531 | ResetScriptList(); |
| 532 | if (m_ScriptSource) { |
| 533 | if (stricmp(ScriptFileName, DEFAULT_SCRIPT_NAME) == 0) |
| 534 | GenerateScriptWizardInfo(m_ScriptSource, false); |
| 535 | else |
| 536 | GenerateScriptWizardInfo(m_ScriptSource, true); |
| 537 | } |
| 538 | |
| 539 | UpdateScriptListbox(); |
| 540 | } |
| 541 | |
| 542 | void CScriptWizard::UpdateScriptListbox() { |
| 543 | CListBox *scrlistbox = (CListBox *)GetDlgItem(IDC_SCR_LISTBOX); |
nothing calls this directly
no test coverage detected