int iMapValidateDlg::DoMapValidateModal(const iStringT& text)
{
	m_text = text;
	return DoModal();
}
CDialog_GeneralConfig::CDialog_GeneralConfig( CNodeView *n, Panel *parent ) : Frame( parent, "_config" )
{
	pNodeView = n;
	GenericShaderData *setup = &n->GetDataForModify();

	SetSizeable( false );
	SetVisible( true );

	SetMouseInputEnabled( true );
	SetKeyBoardInputEnabled( true );
	SetAutoDelete( true );
	Activate();

	m_pRadBut_Sm2 = new RadioButton( this, "rad_1", "SM 2.0b" );
	m_pRadBut_Sm3 = new RadioButton( this, "rad_2", "SM 3.0" );
	m_pRadBut_Sm2->SetSubTabPosition( 1 );
	m_pRadBut_Sm3->SetSubTabPosition( 1 );

	m_pCBut_DepthTest = new CheckButton( this, "depthtest", "Depth testing" );
	m_pCBut_DepthWrite = new CheckButton( this, "depthwrite", "Depth writing" );
	m_pCBut_sRGBWrite = new CheckButton( this, "srgbwrite", "write sRGB" );

	m_pCBox_AlphaBlend = new ComboBox( this, "alphablend", numAblendModes, false );
	
	for ( int i = 0; i < numAblendModes; i++ )
		m_pCBox_AlphaBlend->AddItem( blendNames[i], NULL );

	Assert( numAblendModes == m_pCBox_AlphaBlend->GetItemCount() );

	m_pCBox_Cullmode = new ComboBox( this, "cullmode", 5, false );
	m_pCBox_Cullmode->AddItem( "CW", NULL );
	m_pCBox_Cullmode->AddItem( "CCW", NULL );
	//m_pCBox_Cullmode->AddItem( "Double", NULL );
	m_pCBox_Cullmode->AddItem( "Off", NULL );

	LoadControlSettings("shadereditorui/vgui/dialog_config.res");

	if ( setup->shader->iShaderModel == SM_30 )
		m_pRadBut_Sm3->SetSelected( true );
	else
		m_pRadBut_Sm2->SetSelected( true );

	m_pCBut_DepthTest->SetSelected( setup->shader->iDepthtestmode == DEPTHTEST_NORMAL );
	m_pCBut_DepthWrite->SetSelected( setup->shader->iDepthwritemode == DEPTHWRITE_NORMAL );
	m_pCBox_Cullmode->ActivateItem( setup->shader->iCullmode );
	m_pCBut_sRGBWrite->SetSelected( setup->shader->bsRGBWrite );

	for ( int i = 0; i < numAblendModes; i++ )
	{
		if ( blendIDx[i] == setup->shader->iAlphablendmode )
		{
			m_pCBox_AlphaBlend->ActivateItem( i );
			break;
		}
	}

	SetTitle( "Shader settings", true );


	DoModal();

	SetDeleteSelfOnClose( true );
}
DualErr
CConvertWizardSheet::ExecuteWizard(
    LPCSTR		path,
    PGPBoolean	restartingConversion)
{
    DualErr derr;

    try
    {
        PGPBoolean	adkKeyOnKeyring;
        PGPInt32	result;

        pgpAssertStrValid(path);

        derr = CheckIfLockedKeysOnKeyring(path, &adkKeyOnKeyring);

        if (derr.IsntError())
        {
            if (!adkKeyOnKeyring)
            {
                ReportError(kPGDMajorError_PGPdiskConversionFailed,
                            kPGDMinorError_NoADKWhenConverting);

                ShowReadOnlyListOfPublicKeys(path);
                derr = kPGDMinorError_FailSilently;
            }

        }

        if (derr.IsntError())
        {
            mPath = path;
            mRestartingConversion = restartingConversion;

            SetWizardMode();

            // Invoke the wizard.
            result = DoModal();

            switch (result)
            {
            case -1:
                derr = DualErr(kPGDMinorError_DialogDisplayFailed);
                break;

            case IDCANCEL:

                derr = mDerr;

                if (derr.IsntError())
                    derr = DualErr(kPGDMinorError_UserAbort);

                break;

            default:
                derr = mDerr;
                break;
            }
        }
    }
    catch (CMemoryException *ex)
    {
        ex->Delete();
        derr = DualErr(kPGDMinorError_OutOfMemory);
    }

    return derr;
}
Exemple #4
0
CRenameErrorDlg::EUserAction CRenameErrorDlg::ShowDialog()
{
	// Show the dialog window.
	VERIFY(DoModal() == IDOK);
	return m_nSelectedAction;
}
Exemple #5
0
void CRoomListWnd::OnShowWnd( XMessage* pmsg )
{
	DoModal();	
}