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

Method OnInitDialog

editor/ScriptWizard.cpp:150–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148// CScriptWizard message handlers
149
150BOOL CScriptWizard::OnInitDialog() {
151 CDialog::OnInitDialog();
152
153 // Place all valid script files into the module combo box, then
154 // place all script names relating to the current script file into the script
155 // listbox.
156 CComboBox *modcbox = (CComboBox *)GetDlgItem(IDC_SCRMOD_BOX);
157
158 // m_ScriptCode = D3XReallocProgram(NULL, 0, 0, 0); // LGT: undefined
159 ResetScriptList();
160
161 // place all filenames of scripts into combo box
162 char scrfilename[64];
163 char *filename;
164 scrfilename[0] = 0;
165 filename = StartScriptFileList();
166 while (filename) {
167 strcpy(scrfilename, filename);
168 modcbox->AddString(filename);
169 filename = GetNextScriptFile();
170 }
171 EndScriptFileList();
172
173 modcbox->SelectString(-1, LEVEL_SCRIPT_NAME);
174
175 // update listboxes accordingly to current script module
176 ScriptFileName[0] = 0;
177 ScriptCodeName[0] = 0;
178 CScriptWizard::LoadCurrentModule();
179
180 // Updates the buttons
181 UpdateDialogButtons();
182
183 return TRUE; // return TRUE unless you set the focus to a control
184 // EXCEPTION: OCX Property Pages should return FALSE
185}
186
187void CScriptWizard::OnDestroy() {
188 CDialog::OnDestroy();

Callers

nothing calls this directly

Calls 5

ResetScriptListFunction · 0.85
StartScriptFileListFunction · 0.85
GetNextScriptFileFunction · 0.85
EndScriptFileListFunction · 0.85
AddStringMethod · 0.80

Tested by

no test coverage detected