CPreviewDlg *CEntityDlg::ShowModelChooser() {
	static CPreviewDlg modelDlg;
	modelDlg.SetMode( CPreviewDlg::MODELS );
	modelDlg.SetModal();
	if( modelDlg.GetSafeHwnd() == NULL ) {
		modelDlg.Create( MAKEINTRESOURCE( IDD_DIALOG_PREVIEW ) );
	}
	modelDlg.ShowWindow( SW_SHOW );
	modelDlg.BringWindowToTop();
	while( modelDlg.Waiting() ) {
	}
	return &modelDlg;
}
Exemple #2
0
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::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;
}