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

Method OnInitDialog

editor/WorldObjectsGenericDialog.cpp:529–567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

527}
528
529BOOL CWorldObjectsGenericDialog::OnInitDialog() {
530 static bool first_time = 1;
531
532 m_type_name = Object_type_names[m_type];
533 m_lod = 0;
534
535 Copy_object.description = NULL;
536
537 CDialog::OnInitDialog();
538
539 // Start the timer
540 CWnd::SetTimer(1, 50, NULL);
541
542 // Make sure we have a valid object
543 if (Object_info[m_current].type != m_type)
544 m_current = GetObjectID(m_type);
545
546 // Find out how many locked items
547 m_locked_count = CountLockedItems();
548
549 // Init copy/paste
550 if (first_time) {
551 Copy_object.type = OBJ_NONE;
552 first_time = 0;
553 }
554
555 CEdit *edit = (CEdit *)GetDlgItem(IDC_GENERIC_INVEN_DESCRIPTION);
556 edit->LimitText(0);
557
558 // Initialize sound combo boxes
559 m_explosion_sound_combo.Init(Object_info[m_current].sounds[GSI_EXPLODE]);
560 m_ambient_sound_combo.Init(Object_info[m_current].sounds[GSI_AMBIENT]);
561
562 // Update all the fields
563 UpdateDialog();
564
565 return TRUE; // return TRUE unless you set the focus to a control
566 // EXCEPTION: OCX Property Pages should return FALSE
567}
568
569void CWorldObjectsGenericDialog::OnGenericEditAI() {
570 CAISettingsDlg dlg(Object_info[m_current].ai_info);

Callers

nothing calls this directly

Calls 2

GetObjectIDFunction · 0.50
InitMethod · 0.45

Tested by

no test coverage detected