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

Method UpdateDialog

editor/WorldTexturesDialog.cpp:503–704  ·  view source on GitHub ↗

Redraw the dialog based on our current texture

Source from the content-addressed store, hash-verified

501
502// Redraw the dialog based on our current texture
503void CWorldTexturesDialog::UpdateDialog(void) {
504 CEdit *ebox;
505 CButton *bbox;
506 int n = D3EditState.texdlg_texture;
507 int last_texture = -1;
508 char str[50];
509 int i;
510
511 if (GameTextures[n].used == 0) {
512 n = 0;
513 D3EditState.texdlg_texture = 0;
514 }
515
516 ebox = (CEdit *)GetDlgItem(IDC_TEX_NUM);
517 sprintf(str, "%d", n);
518 ebox->SetWindowText(str);
519
520 ebox = (CEdit *)GetDlgItem(IDC_BITMAP_NAME);
521 if (GameTextures[n].flags & TF_ANIMATED)
522 ebox->SetWindowText(GameVClips[GameTextures[n].bm_handle].name);
523 else
524 ebox->SetWindowText(GameBitmaps[GameTextures[n].bm_handle].name);
525
526 SendDlgItemMessage(IDC_DESTROY_PULLDOWN, CB_RESETCONTENT, 0, 0);
527 for (i = 0; i < MAX_TEXTURES; i++) {
528 if (GameTextures[i].used)
529 SendDlgItemMessage(IDC_DESTROY_PULLDOWN, CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)GameTextures[i].name);
530 }
531
532 ebox = (CEdit *)GetDlgItem(IDC_DESTROY_PULLDOWN);
533
534 if (GameTextures[n].flags & TF_DESTROYABLE)
535 SendDlgItemMessage(IDC_DESTROY_PULLDOWN, CB_SELECTSTRING, 0,
536 (LPARAM)(LPCTSTR)GameTextures[GameTextures[n].destroy_handle].name);
537 else
538 ebox->SetWindowText("NOT DESTROYABLE");
539
540 ebox = (CEdit *)GetDlgItem(IDC_REFLECT);
541 sprintf(str, "%f", GameTextures[n].reflectivity);
542 ebox->SetWindowText(str);
543
544 ebox = (CEdit *)GetDlgItem(IDC_ALPHA_EDIT);
545 sprintf(str, "%f", GameTextures[n].alpha);
546 ebox->SetWindowText(str);
547
548 ebox = (CEdit *)GetDlgItem(IDC_SPEED_EDIT);
549 sprintf(str, "%f", GameTextures[n].speed);
550 ebox->SetWindowText(str);
551
552 ebox = (CEdit *)GetDlgItem(IDC_TEXTURE_WIDTH);
553 if (GameTextures[n].flags & TF_ANIMATED)
554 sprintf(str, "Width: %d", bm_w(GameVClips[GameTextures[n].bm_handle].frames[0], 0));
555 else
556 sprintf(str, "Width: %d", bm_w(GameTextures[n].bm_handle, 0));
557
558 ebox->SetWindowText(str);
559
560 ebox = (CEdit *)GetDlgItem(IDC_TEXTURE_HEIGHT);

Callers

nothing calls this directly

Calls 6

bm_wFunction · 0.85
bm_hFunction · 0.85
mng_FindTrackLockFunction · 0.85
GetTextureBitmapFunction · 0.85
bm_mippedFunction · 0.85
SetSelectedMethod · 0.45

Tested by

no test coverage detected