| 527 | } |
| 528 | |
| 529 | BOOL 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 | |
| 569 | void CWorldObjectsGenericDialog::OnGenericEditAI() { |
| 570 | CAISettingsDlg dlg(Object_info[m_current].ai_info); |
nothing calls this directly
no test coverage detected