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

Method OnInitDialog

editor/PreferencesDialog.cpp:196–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196BOOL CPreferencesDialog::OnInitDialog() {
197 CDialog::OnInitDialog();
198 char **pilotlist;
199 int pilot_count;
200
201 // TODO: Add extra initialization here
202 CSliderCtrl *slew_slider = (CSliderCtrl *)GetDlgItem(IDC_SLEWSLIDER);
203
204 ((CButton *)GetDlgItem(IDC_WINDOWED))->SetCheck(D3EditState.game_render_mode == GM_WINDOWED);
205 ((CButton *)GetDlgItem(IDC_FULLSCREEN_SW))->SetCheck(D3EditState.game_render_mode == GM_FULLSCREEN_SW);
206 ((CButton *)GetDlgItem(IDC_FULLSCREEN_HW))->SetCheck(D3EditState.game_render_mode == GM_FULLSCREEN_HW);
207 ((CButton *)GetDlgItem(IDC_DEBUG_CHECK))->SetCheck(D3EditState.fullscreen_debug_state);
208 ((CButton *)GetDlgItem(IDC_USE_OPENGL))->SetCheck(PreferredRenderer == RENDERER_OPENGL);
209 ((CButton *)GetDlgItem(IDC_USE_GLIDE))->SetCheck(PreferredRenderer == RENDERER_GLIDE);
210 ((CButton *)GetDlgItem(IDC_USE_D3D))->SetCheck(PreferredRenderer == RENDERER_DIRECT3D);
211 ((CButton *)GetDlgItem(IDC_BILINEAR_CHECK))->SetCheck(Render_preferred_state.filtering);
212 ((CButton *)GetDlgItem(IDC_MIPPING_CHECK))->SetCheck(Render_preferred_state.mipping);
213 ((CButton *)GetDlgItem(IDC_JOYENABLE))->SetCheck(D3EditState.joy_slewing);
214 ((CButton *)GetDlgItem(IDC_IGC_ENABLED))->SetCheck(Cinematics_enabled);
215
216 slew_slider->SetRange(0, 3);
217 slew_slider->SetPos((Slew_key_speed - 0.5) / 0.5);
218
219 CComboBox *combo = (CComboBox *)GetDlgItem(IDC_DEFAULT_PILOT);
220 combo->ResetContent();
221 pilotlist = PltGetPilots(&pilot_count);
222 for (int i = 0; i < pilot_count; i++) {
223 combo->AddString(pilotlist[i]);
224 }
225 if (pilot_count) {
226 combo->SelectString(-1, Default_pilot);
227 }
228 PltClearList();
229
230 if (D3EditState.game_render_mode == GM_FULLSCREEN_HW)
231 EnableHardwareOptions();
232 else
233 DisableHardwareOptions();
234
235 PltGetPilotsFree();
236
237 return TRUE; // return TRUE unless you set the focus to a control
238 // EXCEPTION: OCX Property Pages should return FALSE
239}
240
241void CPreferencesDialog::OnBilinearCheck() {
242 // TODO: Add your control notification handler code here

Callers

nothing calls this directly

Calls 7

PltGetPilotsFunction · 0.85
PltClearListFunction · 0.85
PltGetPilotsFreeFunction · 0.85
SetCheckMethod · 0.80
AddStringMethod · 0.80
SetRangeMethod · 0.45
SetPosMethod · 0.45

Tested by

no test coverage detected