CPreviewDlg *CEntityDlg::ShowSoundChooser() { static CPreviewDlg soundDlg; soundDlg.SetMode(CPreviewDlg::SOUNDS); soundDlg.SetModal(); if (soundDlg.GetSafeHwnd() == NULL) { soundDlg.Create(MAKEINTRESOURCE(IDD_DIALOG_PREVIEW)); } soundDlg.ShowWindow(SW_SHOW); while (soundDlg.Waiting()) { } return &soundDlg; }
CPreviewDlg *CEntityDlg::ShowMaterialChooser() { static CPreviewDlg matDlg; matDlg.SetMode(CPreviewDlg::MATERIALS); matDlg.SetModal(); if (matDlg.GetSafeHwnd() == NULL) { matDlg.Create(MAKEINTRESOURCE(IDD_DIALOG_PREVIEW)); } matDlg.ShowWindow(SW_SHOW); matDlg.BringWindowToTop(); while (matDlg.Waiting()) { } return &matDlg; }
CPreviewDlg *CEntityDlg::ShowGuiChooser() { static CPreviewDlg guiDlg; guiDlg.SetMode(CPreviewDlg::GUIS); guiDlg.SetModal(); if (guiDlg.GetSafeHwnd() == NULL) { guiDlg.Create(MAKEINTRESOURCE(IDD_DIALOG_PREVIEW)); } guiDlg.ShowWindow(SW_SHOW); guiDlg.BringWindowToTop(); while (guiDlg.Waiting()) { } return &guiDlg; }
CPreviewDlg *CEntityDlg::ShowParticleChooser() { static CPreviewDlg modelDlg; modelDlg.SetMode(CPreviewDlg::PARTICLES); modelDlg.SetModal(); if (modelDlg.GetSafeHwnd() == NULL) { modelDlg.Create(MAKEINTRESOURCE(IDD_DIALOG_PREVIEW)); } modelDlg.ShowWindow(SW_SHOW); modelDlg.BringWindowToTop(); while (modelDlg.Waiting()) { } return &modelDlg; }
CPreviewDlg *CEntityDlg::ShowSkinChooser(entity_t *ent) { static CPreviewDlg modelDlg; modelDlg.SetMode(CPreviewDlg::SKINS); modelDlg.SetModal(); if (modelDlg.GetSafeHwnd() == NULL) { modelDlg.Create(MAKEINTRESOURCE(IDD_DIALOG_PREVIEW)); } modelDlg.RebuildTree( ( ent ) ? ent->epairs.GetString( "model" ) : "" ); modelDlg.ShowWindow(SW_SHOW); modelDlg.BringWindowToTop(); while (modelDlg.Waiting()) { } return &modelDlg; }