| 323 | #define NULL_NAME "<none>" |
| 324 | |
| 325 | void CWorldObjectsDoorDialog::UpdateDialog() { |
| 326 | CEdit *ebox; |
| 327 | CButton *bbox; |
| 328 | int n = D3EditState.current_door; |
| 329 | char str[50]; |
| 330 | |
| 331 | if (Num_doors < 1) { |
| 332 | bbox = (CButton *)GetDlgItem(IDC_DOOR_NEXT); |
| 333 | bbox->EnableWindow(FALSE); |
| 334 | bbox = (CButton *)GetDlgItem(IDC_DOOR_PREV); |
| 335 | bbox->EnableWindow(FALSE); |
| 336 | |
| 337 | return; |
| 338 | } else { |
| 339 | bbox = (CButton *)GetDlgItem(IDC_DOOR_NEXT); |
| 340 | bbox->EnableWindow(TRUE); |
| 341 | bbox = (CButton *)GetDlgItem(IDC_DOOR_PREV); |
| 342 | bbox->EnableWindow(TRUE); |
| 343 | } |
| 344 | |
| 345 | if (!Doors[n].used) |
| 346 | n = D3EditState.current_door = GetNextDoor(n); |
| 347 | |
| 348 | // ebox=(CEdit *) GetDlgItem (IDC_DOOR_NAME_EDIT); |
| 349 | // ebox->SetWindowText (Doors[n].name); |
| 350 | |
| 351 | bbox = (CButton *)GetDlgItem(IDC_TRANSPARENCY); |
| 352 | bbox->SetCheck(Doors[n].flags & DF_SEETHROUGH); |
| 353 | |
| 354 | bool blastable = ((Doors[n].flags & DF_BLASTABLE) != 0); |
| 355 | bbox = (CButton *)GetDlgItem(IDC_DOOR_BLASTABLE); |
| 356 | bbox->SetCheck(blastable); |
| 357 | |
| 358 | ebox = (CEdit *)GetDlgItem(IDC_DOOR_MODEL_NAME_EDIT); |
| 359 | ebox->SetWindowText(Poly_models[Doors[n].model_handle].name); |
| 360 | |
| 361 | ebox = (CEdit *)GetDlgItem(IDC_DOOR_OPEN_TIME); |
| 362 | sprintf(str, "%f", Doors[n].total_open_time); |
| 363 | ebox->SetWindowText(str); |
| 364 | |
| 365 | ebox = (CEdit *)GetDlgItem(IDC_DOOR_STAYS_OPEN); |
| 366 | sprintf(str, "%f", Doors[n].total_time_open); |
| 367 | ebox->SetWindowText(str); |
| 368 | |
| 369 | ebox = (CEdit *)GetDlgItem(IDC_CLOSE_TIME); |
| 370 | sprintf(str, "%f", Doors[n].total_close_time); |
| 371 | ebox->SetWindowText(str); |
| 372 | |
| 373 | // Update hitpoint editing controls |
| 374 | GetDlgItem(IDC_DOOR_HITPOINTS_TEXT)->EnableWindow(blastable); |
| 375 | ebox = (CEdit *)GetDlgItem(IDC_DOOR_HITPOINTS_EDIT); |
| 376 | sprintf(str, "%d", Doors[n].hit_points); |
| 377 | ebox->SetWindowText(str); |
| 378 | ebox->EnableWindow(blastable); |
| 379 | |
| 380 | bbox = (CButton *)GetDlgItem(IDC_CHECKIN_DOOR); |
| 381 | if (mng_FindTrackLock(Doors[n].name, PAGETYPE_DOOR) == -1) { |
| 382 | bbox->EnableWindow(FALSE); |
nothing calls this directly
no test coverage detected