当前位置: 首页>>代码示例>>C++>>正文


C++ CDXUTDialog::AddCheckBox方法代码示例

本文整理汇总了C++中CDXUTDialog::AddCheckBox方法的典型用法代码示例。如果您正苦于以下问题:C++ CDXUTDialog::AddCheckBox方法的具体用法?C++ CDXUTDialog::AddCheckBox怎么用?C++ CDXUTDialog::AddCheckBox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CDXUTDialog的用法示例。


在下文中一共展示了CDXUTDialog::AddCheckBox方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: InitApp

//--------------------------------------------------------------------------------------
// Initialize the app 
//--------------------------------------------------------------------------------------
void InitApp()
{
	// Initialize dialogs
	g_SampleUI.Init(&g_DialogResourceManager);

	int iY = 10;
	g_SampleUI.SetCallback(OnGUIEvent); iY = 10; 

	g_SampleUI.AddStatic(IDC_STATIC_TIMESCALE, L"Time scale", 50, iY, 100, 24);
	g_SampleUI.AddSlider(IDC_SLIDER_TIMESCALE, 50, iY += 16, 100, 22);
	g_SampleUI.AddStatic(IDC_STATIC_WEIGHT, L"idle / Walk / run", 50, iY += 20, 100, 24);
	g_SampleUI.AddSlider(IDC_SLIDER_WEIGHT, 50, iY += 16, 100, 22, 0, 100, 0);

	g_SampleUI.AddStatic(IDC_STATIC_ARM, L"arm", 50, iY += 40, 100, 24);
	g_SampleUI.AddSlider(IDC_SLIDER_ARM, 50, iY += 16, 100, 22, 0, 100, 50);
	g_SampleUI.AddStatic(IDC_STATIC_LEG, L"leg", 50, iY += 20, 100, 24);
	g_SampleUI.AddSlider(IDC_SLIDER_LEG, 50, iY += 16, 100, 22, 0, 100, 50);
	g_SampleUI.AddStatic(IDC_STATIC_BODY, L"body", 50, iY += 20, 100, 24);
	g_SampleUI.AddSlider(IDC_SLIDER_BODY, 50, iY += 16, 100, 22, 0, 100, 50);

	g_SampleUI.AddCheckBox(IDC_CHECK_DIFFUSEMAP, L"Diffusemap", 50, iY += 40, 100, 22, true);
	g_SampleUI.AddCheckBox(IDC_CHECK_NORMALMAP, L"Normalmap", 50, iY += 20, 100, 22, true);
	g_SampleUI.AddCheckBox(IDC_CHECK_GLOSS, L"Glossmap", 50, iY += 20, 100, 22, true);
	g_SampleUI.AddCheckBox(IDC_CHECK_WIREFRAME, L"Wireframe", 50, iY += 20, 100, 22);
}
开发者ID:ColinGilbert,项目名称:grandpa-animation,代码行数:28,代码来源:BoneControlDemo.cpp

示例2: InitGUI

//--------------------------------------------------------------------------------------
//
//--------------------------------------------------------------------------------------
void InitGUI()
{
    // Initialize dialogs
    g_SettingsDlg.Init(&g_DialogResourceManager);
    g_HUD.Init(&g_DialogResourceManager);
    g_HUD.SetCallback(OnGUIEvent);
    g_TextRenderer.Init(&g_DialogResourceManager);
    
    int iY = 10; 
    g_HUD.AddButton  (IDC_TOGGLEFULLSCREEN,   L"Toggle full screen" ,   35, iY, 160, 22);
    g_HUD.AddButton  (IDC_TOGGLEREF,          L"Toggle REF (F3)"    ,   35, iY += 24, 160, 22, VK_F3);
    g_HUD.AddButton  (IDC_CHANGEDEVICE,       L"Change device (F2)" ,   35, iY += 24, 160, 22, VK_F2);
    iY += 20;

    g_HUD.AddCheckBox(IDC_DEINTERLEAVE,     L"Deinterleaved Texturing", 35, iY += 28, 125, 22, g_UseDeinterleavedTexturing);
    g_HUD.AddCheckBox(IDC_RANDOMIZE,        L"Randomize Samples",       35, iY += 28, 125, 22, g_RandomizeSamples);
    g_HUD.AddCheckBox(IDC_BLUR_AO,          L"Blur AO",                 35, iY += 28, 125, 22, g_BlurAO);
    iY += 24;

    CDXUTComboBox *pComboBox;
    g_HUD.AddComboBox(IDC_CHANGESCENE,    35, iY += 24, 160, 22, 'M', false, &pComboBox);
    for (int i = 0; i < ARRAYSIZE(g_MeshDesc); i++)
    {
        pComboBox->AddItem(g_MeshDesc[i].Name, NULL);
    }
    iY += 24;

    WCHAR sz[100];
    int dy = 20;
    StringCchPrintf(sz, 100, UI_RADIUS_MULT L"%0.2f", g_AOParams.Radius); 
    g_HUD.AddStatic(IDC_RADIUS_STATIC, sz, 35, iY += dy, 125, 22);
    g_HUD.AddSlider(IDC_RADIUS_SLIDER, 50, iY += dy, 100, 22, 0, 100, int(g_AOParams.Radius / MAX_RADIUS_MULT * 100));

    StringCchPrintf(sz, 100, UI_AO_BIAS L"%g", g_AOParams.Bias); 
    g_HUD.AddStatic(IDC_BIAS_STATIC, sz, 35, iY += dy, 125, 22);
    g_HUD.AddSlider(IDC_BIAS_SLIDER, 50, iY += dy, 100, 22, 0, 500, int(g_AOParams.Bias * 1000));

    StringCchPrintf(sz, 100, UI_POW_EXPONENT L"%0.2f", g_AOParams.PowerExponent); 
    g_HUD.AddStatic(IDC_EXPONENT_STATIC, sz, 35, iY += dy, 125, 22);
    g_HUD.AddSlider(IDC_EXPONENT_SLIDER, 50, iY += dy, 100, 22, 0, 400, (int)(100.0f*g_AOParams.PowerExponent));

    StringCchPrintf(sz, 100, UI_BLUR_SHARPNESS L"%0.2f", g_AOParams.Blur.Sharpness); 
    g_HUD.AddStatic(IDC_BLUR_SHARPNESS_STATIC, sz, 35, iY += dy, 125, 22);
    g_HUD.AddSlider(IDC_BLUR_SHARPNESS_SLIDER, 50, iY += dy, 100, 22, 0, 1600, (int)(100.0f*g_AOParams.Blur.Sharpness));

    UINT ButtonGroup = 0;
    iY += 24;
    g_HUD.AddRadioButton( IDC_1xMSAA,       ButtonGroup, L"1X MSAA",                35, iY += 24, 125, 22,  (g_MSAACurrentSettings == MSAA_MODE_1X) );
    g_HUD.AddRadioButton( IDC_2xMSAA,       ButtonGroup, L"2X MSAA",                35, iY += 24, 125, 22,  (g_MSAACurrentSettings == MSAA_MODE_2X) );
    g_HUD.AddRadioButton( IDC_4xMSAA,       ButtonGroup, L"4X MSAA",                35, iY += 24, 125, 22,  (g_MSAACurrentSettings == MSAA_MODE_4X) );
    g_HUD.AddRadioButton( IDC_8xMSAA,       ButtonGroup, L"8X MSAA",                35, iY += 24, 125, 22,  (g_MSAACurrentSettings == MSAA_MODE_8X) );

    ++ButtonGroup;
    iY += 24;
    g_HUD.AddRadioButton( IDC_PER_PIXEL_AO,   ButtonGroup, L"PER_PIXEL_AO",         35, iY += 24, 125, 22,  (g_AOParams.Output.MSAAMode == GFSDK_SSAO_PER_PIXEL_AO) );
    g_HUD.AddRadioButton( IDC_PER_SAMPLE_AO,  ButtonGroup, L"PER_SAMPLE_AO",        35, iY += 24, 125, 22,  (g_AOParams.Output.MSAAMode == GFSDK_SSAO_PER_SAMPLE_AO) );
}
开发者ID:151706061,项目名称:D3DSamples,代码行数:60,代码来源:DeinterleavedTexturing.cpp

示例3: InitApp

//--------------------------------------------------------------------------------------
// Initialize the app 
//--------------------------------------------------------------------------------------
void InitApp()
{
	// Initialize dialogs
	g_SampleUI.Init(&g_DialogResourceManager);

	int iY = 10;
	g_SampleUI.SetCallback(OnGUIEvent); iY = 10; 

	g_SampleUI.AddStatic(IDC_STATIC_TIMESCALE, L"Time scale", 50, iY, 100, 24);
	g_SampleUI.AddSlider(IDC_SLIDER_TIMESCALE, 50, iY += 16, 100, 22);
	g_SampleUI.AddStatic(IDC_STATIC_WEIGHT, L"idle / Walk / run", 50, iY += 20, 100, 24);
	g_SampleUI.AddSlider(IDC_SLIDER_WEIGHT, 50, iY += 16, 100, 22, 0, 100, 0);

	g_SampleUI.AddCheckBox(IDC_CHECK_RAGDOLL, L"Ragdoll", 50, iY += 20, 100, 22, false);

	g_SampleUI.AddCheckBox(IDC_CHECK_GPU_SKINNING, L"GPU Skinning", 50, iY += 30, 100, 22, false);

	g_SampleUI.AddCheckBox(IDC_CHECK_DIFFUSEMAP, L"Diffusemap", 50, iY += 30, 100, 22, true);
	g_SampleUI.AddCheckBox(IDC_CHECK_NORMALMAP, L"Normalmap", 50, iY += 20, 100, 22, true);
	g_SampleUI.AddCheckBox(IDC_CHECK_GLOSS, L"Glossmap", 50, iY += 20, 100, 22, true);
	g_SampleUI.AddCheckBox(IDC_CHECK_WIREFRAME, L"Wireframe", 50, iY += 20, 100, 22);
	g_SampleUI.AddCheckBox(IDC_CHECK_DRAW_NORMAL, L"Draw Normal", 50, iY += 20, 100, 22, false);
	g_SampleUI.AddCheckBox(IDC_CHECK_DRAW_SKELETON, L"Draw Skeleton", 50, iY += 20, 100, 22, false);
	
	g_SampleUI.AddCheckBox(IDC_CHECK_DRAW_BOUNDINGBOX, L"Draw Bounding", 50, iY += 20, 100, 22, false);

	g_SampleUI.AddButton(IDC_BUTTON_ATTACK, L"Attack", 50, iY += 25, 100, 22);
}
开发者ID:ColinGilbert,项目名称:grandpa-animation,代码行数:31,代码来源:Demo.cpp

示例4: initApp

void initApp() {
    hud.Init(&dialogResourceManager);

    hud.SetCallback(onGUIEvent); int iY = 10;
    hud.AddButton(IDC_TOGGLE_FULLSCREEN, L"Toggle full screen", 35, iY, HUD_WIDTH, 22);

    iY += 24;

    hud.AddComboBox(IDC_PRESET, 35, iY += 24, HUD_WIDTH, 22, 0, false);
    hud.GetComboBox(IDC_PRESET)->AddItem(L"SMAA Low", (LPVOID) 0);
    hud.GetComboBox(IDC_PRESET)->AddItem(L"SMAA Medium", (LPVOID) 1);
    hud.GetComboBox(IDC_PRESET)->AddItem(L"SMAA High", (LPVOID) 2);
    hud.GetComboBox(IDC_PRESET)->AddItem(L"SMAA Ultra", (LPVOID) 3);
    hud.GetComboBox(IDC_PRESET)->AddItem(L"SMAA Custom", (LPVOID) 4);
    hud.GetComboBox(IDC_PRESET)->SetSelectedByData((LPVOID) 2);

    hud.AddComboBox(IDC_DETECTION_MODE, 35, iY += 24, HUD_WIDTH, 22, 0, false);
    hud.GetComboBox(IDC_DETECTION_MODE)->AddItem(L"Luma edge det.", (LPVOID) 0);
    hud.GetComboBox(IDC_DETECTION_MODE)->AddItem(L"Color edge det.", (LPVOID) 1);
    hud.GetComboBox(IDC_DETECTION_MODE)->AddItem(L"Depth edge det.", (LPVOID) 2);

    hud.AddCheckBox(IDC_ANTIALIASING, L"SMAA Anti-Aliasing", 35, iY += 24, HUD_WIDTH, 22, true);
    hud.AddCheckBox(IDC_PROFILE, L"Profile", 35, iY += 24, 125, 22, false);
    wstringstream s;
    s << L"Threshold: " << commandlineOptions.threshold;
    hud.AddStatic(IDC_THRESHOLD_LABEL, s.str().c_str(), 35, iY += 24, HUD_WIDTH, 22);
    hud.AddSlider(IDC_THRESHOLD, 35, iY += 24, HUD_WIDTH, 22, 0, 100, int(100.0f * commandlineOptions.threshold / 0.5f));
    hud.GetStatic(IDC_THRESHOLD_LABEL)->SetVisible(false);
    hud.GetSlider(IDC_THRESHOLD)->SetVisible(false);

    s = wstringstream();
    s << L"Max Search Steps: " << commandlineOptions.searchSteps;
    hud.AddStatic(IDC_MAX_SEARCH_STEPS_LABEL, s.str().c_str(), 35, iY += 24, HUD_WIDTH, 22);
    hud.AddSlider(IDC_MAX_SEARCH_STEPS, 35, iY += 24, HUD_WIDTH, 22, 0, 100, int(100.0f * commandlineOptions.searchSteps / 98.0f));
    hud.GetStatic(IDC_MAX_SEARCH_STEPS_LABEL)->SetVisible(false);
    hud.GetSlider(IDC_MAX_SEARCH_STEPS)->SetVisible(false);

    s = wstringstream();
    s << L"Max Diag. Search Steps: " << commandlineOptions.diagSearchSteps;
    hud.AddStatic(IDC_MAX_SEARCH_STEPS_DIAG_LABEL, s.str().c_str(), 35, iY += 24, HUD_WIDTH, 22);
    hud.AddSlider(IDC_MAX_SEARCH_STEPS_DIAG, 35, iY += 24, HUD_WIDTH, 22, 0, 100, int(100.0f * commandlineOptions.diagSearchSteps / 20.0f));
    hud.GetStatic(IDC_MAX_SEARCH_STEPS_DIAG_LABEL)->SetVisible(false);
    hud.GetSlider(IDC_MAX_SEARCH_STEPS_DIAG)->SetVisible(false);

    s = wstringstream();
    s << L"Corner Rounding: " << commandlineOptions.cornerRounding;
    hud.AddStatic(IDC_CORNER_ROUNDING_LABEL, s.str().c_str(), 35, iY += 24, HUD_WIDTH, 22);
    hud.AddSlider(IDC_CORNER_ROUNDING, 35, iY += 24, HUD_WIDTH, 22, 0, 100, int(100.0f * commandlineOptions.cornerRounding / 100.0f));
    hud.GetStatic(IDC_CORNER_ROUNDING_LABEL)->SetVisible(false);
    hud.GetSlider(IDC_CORNER_ROUNDING)->SetVisible(false);
	
}
开发者ID:kphillisjr,项目名称:smaa,代码行数:52,代码来源:Demo.cpp

示例5: InitApp

//--------------------------------------------------------------------------------------
// Initialize the app 
//--------------------------------------------------------------------------------------
void InitApp()
{
	displacement_level = 1.5;
	tess_lvl = 80;
	drawwire = false;
    D3DXVECTOR3 vLightDir( -1, 1, -1 );
    D3DXVec3Normalize( &vLightDir, &vLightDir );
    g_LightControl.SetLightDirection( vLightDir );

    // Initialize dialogs
    g_D3DSettingsDlg.Init( &g_DialogResourceManager );
    g_HUD.Init( &g_DialogResourceManager );
    g_SampleUI.Init( &g_DialogResourceManager );

    g_HUD.SetCallback( OnGUIEvent ); int iY = 10;
    g_HUD.AddButton( IDC_TOGGLEFULLSCREEN, L"Toggle full screen", 0, iY, 170, 23 );
    g_HUD.AddButton( IDC_TOGGLEREF, L"Toggle REF (F3)", 0, iY += 26, 170, 23, VK_F3 );
    g_HUD.AddButton( IDC_CHANGEDEVICE, L"Change device (F2)", 0, iY += 26, 170, 23, VK_F2 );

    g_SampleUI.SetCallback( OnGUIEvent ); 
	iY = -30;

	WCHAR sz[100];
    //iY += 24;
	  
    swprintf_s( sz, L"Tessellation Level: %2.1f", tess_lvl );
    g_SampleUI.AddStatic( IDC_TESSLVL_STATIC, sz, -10, iY += 26, 150, 22 );
    g_SampleUI.AddSlider( IDC_TESSLVL, 10, iY += 24, 150, 22, 1, 80, tess_lvl );

	 iY += 14;
    swprintf_s( sz, L"Displacement Level: %2.1f", displacement_level );
    g_SampleUI.AddStatic( IDC_DISPLACEMENTLVL_STATIC, sz, -10, iY += 26, 150, 22 );
    g_SampleUI.AddSlider( IDC_DISPLACEMENTLVL, 10, iY += 24, 150, 22, 0, 150, (float)(displacement_level)/ 100.0f );

	iY += 10;
    g_SampleUI.AddCheckBox( IDC_TOGGLEWIRE, L"Toggle Wires", 20, iY += 26, 150, 22, drawwire );


	iY += 10;
    g_SampleUI.AddCheckBox( IDC_TOGGLEDT, L"Toggle Distanced Based tesselation", -120, iY += 26, 150, 22, true );
	

    iY += 10;
    g_SampleUI.AddRadioButton( IDC_PARTITION_INTEGER, IDC_PARTITION_MODE, L"Integer", 20, iY += 26, 170, 22 );
    g_SampleUI.AddRadioButton( IDC_PARTITION_FRAC_EVEN, IDC_PARTITION_MODE, L"Fractional Even", 20, iY += 26, 170, 22 );
    g_SampleUI.AddRadioButton( IDC_PARTITION_FRAC_ODD, IDC_PARTITION_MODE, L"Fractional Odd", 20, iY += 26, 170, 22 );
    g_SampleUI.GetRadioButton( IDC_PARTITION_INTEGER )->SetChecked( true );

	iY += 10;
    g_SampleUI.AddCheckBox( IDC_TOGGLEBUILDING, L"Toggle buildings", 20, iY += 26, 150, 22, true );
	
}
开发者ID:AlexKLM,项目名称:DX11-Shader-Language-Coursework,代码行数:55,代码来源:BasicHLSL11.cpp

示例6: REF

//--------------------------------------------------------------------------------------
// Create any D3D9 resources that will live through a device reset (D3DPOOL_MANAGED)
// and aren't tied to the back buffer size
//--------------------------------------------------------------------------------------
HRESULT CALLBACK OnD3D9CreateDevice( IDirect3DDevice9* pd3dDevice, const D3DSURFACE_DESC* pBackBufferSurfaceDesc, void* pUserContext )
{
	g_SettingsDlg.Init( &g_DialogResourceManager );
	g_HUD.Init( &g_DialogResourceManager );
	g_SampleUI.Init( &g_DialogResourceManager );

	g_DialogResourceManager.OnD3D9CreateDevice( pd3dDevice );
	g_SettingsDlg.OnD3D9CreateDevice( pd3dDevice );


	g_HUD.SetCallback( OnGUIEvent ); 
	int iY = 10;
	g_HUD.AddButton( IDC_TOGGLEFULLSCREEN, L"Toggle full screen", 35, iY, 125, 22 );
	g_HUD.AddButton( IDC_TOGGLEREF, L"Toggle REF (F3)", 35, iY += 24, 125, 22, VK_F3 );
	g_HUD.AddButton( IDC_CHANGEDEVICE, L"Change device (F2)", 35, iY += 24, 125, 22, VK_F2 );

	g_SampleUI.SetCallback( OnGUIEvent );

	iY = 10;
	g_SampleUI.AddCheckBox( IDC_DISABLEALBEDO, L"Disable albedo", 35, iY += 24, 160, 22, g_DisableAlbedo );
	g_SampleUI.AddCheckBox( IDC_PAUSEANIMATION, L"Pause animation", 35, iY += 24, 160, 22, g_PauseAnimation );
	g_SampleUI.AddCheckBox( IDC_DISABLESKINING, L"Disable skining", 35, iY += 24, 160, 22, g_DisableSkining );
	g_SampleUI.AddCheckBox( IDC_SHOWNORMALS, L"Show normals", 35, iY += 24, 160, 22, g_ShowNormals );


	CDXUTComboBox* pCombo;
	g_SampleUI.AddComboBox( IDC_TECHNIQUECOMBO, 35, iY += 30, 160, 22, 0, false, &pCombo );
	if( pCombo )
	{
		pCombo->SetDropHeight( 100 );
		pCombo->AddItem( L"Unpacked TBN", ( LPVOID )0x0 );
		pCombo->AddItem( L"Packed TBN", ( LPVOID )0x1 );
		pCombo->AddItem( L"Unpacked Quaternion", ( LPVOID )0x2 );
		pCombo->AddItem( L"Packed Quaternion", ( LPVOID )0x3 );
		pCombo->SetSelectedByIndex(g_TechniqueIndex);
	}

	iY = 10;

	D3DXCreateFont( pd3dDevice, 15, 0, FW_BOLD, 1, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, L"Arial", &g_pFont9 );

	d3dAnimation.Create(pd3dDevice);
	d3dMesh.Create(pd3dDevice);
	d3dFloor.Create(pd3dDevice);

	FBXImporter importer;
	const char* fbxFileName = ".\\data\\MilitaryMechanic.fbx";
	importer.Import(fbxFileName, &d3dMesh, &d3dAnimation);

	return S_OK;
}
开发者ID:SergeyMakeev,项目名称:Quaternions-Revisited,代码行数:55,代码来源:QuaternionsRevisited.cpp

示例7: InitApp

//--------------------------------------------------------------------------------------
// Initialize the app 
//--------------------------------------------------------------------------------------
void InitApp()
{ 
  // Initialize dialogs
  g_D3DSettingsDlg.Init( &g_DialogResourceManager );
  g_SampleUI.Init( &g_DialogResourceManager );
  g_HUD.Init( &g_DialogResourceManager );
  
  g_HUD.SetCallback( OnGUIEvent ); INT iY = 10;
  
  // Add tons of GUI stuff
  g_HUD.AddButton( IDC_TOGGLEFULLSCREEN, L"Toggle full screen", 0, iY, 170, 23 );
  g_HUD.AddButton( IDC_CHANGEDEVICE, L"Change device (F2)", 0, iY += 26, 170, 23, VK_F2 );
  g_HUD.AddButton( IDC_TOGGLEWARP, L"Toggle WARP (F4)", 0, iY += 26, 170, 23, VK_F4 );
  
  g_HUD.AddCheckBox( IDC_TOGGLEDYNAMICLIGHTS, L"Dynamic Lights", 0, iY+=26, 170, 23, true, VK_F8 );

  g_HUD.AddComboBox( IDC_DEBUGRENDERING, 0, iY +=26,  170, 23, VK_F9, false, &g_DebugRenderingCombo );

  g_DebugRenderingCombo->AddItem( L"Scene",     ULongToPtr( DEBUG_RENDERING_NONE     ) );
  g_DebugRenderingCombo->AddItem( L"Normals",   ULongToPtr( DEBUG_RENDERING_NORMALS  ) );
  g_DebugRenderingCombo->AddItem( L"Colors",    ULongToPtr( DEBUG_RENDERING_COLORS   ) );
  g_DebugRenderingCombo->AddItem( L"LLL",       ULongToPtr( DEBUG_RENDERING_LLL      ) );

  g_SampleUI.SetCallback( OnGUIEvent ); iY = 10;
}
开发者ID:JasSra,项目名称:GPU-Pro-6,代码行数:28,代码来源:AdvancedLighting.cpp

示例8: InitApp

//--------------------------------------------------------------------------------------
// Initialize the app 
//--------------------------------------------------------------------------------------
void InitApp()
{
    // Initialize dialogs
    g_D3DSettingsDlg.Init( &g_DialogResourceManager );
    g_HUD.Init( &g_DialogResourceManager );
    g_SampleUI.Init( &g_DialogResourceManager );

    g_HUD.SetCallback( OnGUIEvent ); int iY = 20;
    g_HUD.AddButton( IDC_TOGGLEFULLSCREEN, L"Toggle full screen", 0, iY, 170, 22 );
    g_HUD.AddButton( IDC_TOGGLEREF, L"Toggle REF (F3)", 0, iY += 26, 170, 22, VK_F3 );
    g_HUD.AddButton( IDC_CHANGEDEVICE, L"Change device (F2)", 0, iY += 26, 170, 22, VK_F2 );

    g_SampleUI.SetCallback( OnGUIEvent ); iY = 10;

    WCHAR sz[100];
    iY += 24;
    swprintf_s( sz, L"Patch Divisions: %2.1f", g_fSubdivs );
    g_SampleUI.AddStatic( IDC_PATCH_SUBDIVS_STATIC, sz, 10, iY += 26, 150, 22 );
    g_SampleUI.AddSlider( IDC_PATCH_SUBDIVS, 10, iY += 24, 150, 22, 10 * MIN_DIVS, 10 * MAX_DIVS, (int)(g_fSubdivs * 10) );

    iY += 24;
    g_SampleUI.AddCheckBox( IDC_TOGGLE_LINES, L"Toggle Wires", 20, iY += 26, 150, 22, g_bDrawWires );

    iY += 24;
    g_SampleUI.AddRadioButton( IDC_PARTITION_INTEGER, IDC_PARTITION_MODE, L"Integer", 20, iY += 26, 170, 22 );
    g_SampleUI.AddRadioButton( IDC_PARTITION_FRAC_EVEN, IDC_PARTITION_MODE, L"Fractional Even", 20, iY += 26, 170, 22 );
    g_SampleUI.AddRadioButton( IDC_PARTITION_FRAC_ODD, IDC_PARTITION_MODE, L"Fractional Odd", 20, iY += 26, 170, 22 );
    g_SampleUI.GetRadioButton( IDC_PARTITION_INTEGER )->SetChecked( true );

    // Setup the camera's view parameters
    static const XMVECTORF32 s_vecEye = { 1.0f, 1.5f, -3.5f, 0.f };
    static const XMVECTORF32 s_vecAt = { 0.0f, 0.0f, 0.0f, 0.f };
    g_Camera.SetViewParams( s_vecEye, s_vecAt );

}
开发者ID:AndreAhmed,项目名称:directx-sdk-samples,代码行数:38,代码来源:SimpleBezier11.cpp

示例9: InitApp

//--------------------------------------------------------------------------------------
// Initialize the app 
//--------------------------------------------------------------------------------------
void InitApp()
{
    g_bSpinning = true;

    g_D3DSettingsDlg.Init( &g_DialogResourceManager );
    g_HUD.Init( &g_DialogResourceManager );
    g_SampleUI.Init( &g_DialogResourceManager );

    g_HUD.SetCallback( OnGUIEvent ); int iY = 10;
    g_HUD.AddButton( IDC_TOGGLEFULLSCREEN, L"Toggle full screen", 35, iY, 125, 22 );
    g_HUD.AddButton( IDC_CHANGEDEVICE, L"Change device (F2)", 35, iY += 24, 125, 22, VK_F2 );
    g_HUD.AddButton( IDC_TOGGLEREF, L"Toggle REF (F3)", 35, iY += 24, 125, 22, VK_F3 );
    g_HUD.AddButton( IDC_TOGGLEWARP, L"Toggle WARP (F4)", 35, iY += 24, 125, 22, VK_F4 );

    g_SampleUI.SetCallback( OnGUIEvent ); iY = 10;

    WCHAR sz[100];
    iY += 24;
    swprintf_s( sz, 100, L"Explode Amount: %0.2f", g_fExplode );
    g_SampleUI.AddStatic( IDC_EXPLODE_STATIC, sz, 35, iY += 24, 125, 22 );
    g_SampleUI.AddSlider( IDC_EXPLODE_SCALE, 50, iY += 24, 100, 22, 0, 3000, ( int )( g_fExplode * 100.0f ) );

    iY += 24;
    g_SampleUI.AddCheckBox( IDC_TOGGLESPIN, L"Toggle Spinning", 35, iY += 24, 125, 22, g_bSpinning );
}
开发者ID:KNeal,项目名称:Oculus,代码行数:28,代码来源:Tutorial13.cpp

示例10: InitApp

//--------------------------------------------------------------------------------------
// Initialize the app 
//--------------------------------------------------------------------------------------
void InitApp()
{
    g_SettingsDlg.Init( &g_DialogResourceManager );
    g_HUD.Init( &g_DialogResourceManager );
    g_SampleUI.Init( &g_DialogResourceManager );

    g_HUD.SetCallback( OnGUIEvent );
    int iY = 30;
    int iYo = 26;
    g_HUD.AddButton( IDC_TOGGLEFULLSCREEN, L"Toggle full screen", 0, iY, 170, 22 );
    g_HUD.AddButton( IDC_TOGGLEREF, L"Toggle REF (F3)", 0, iY += iYo, 170, 22, VK_F3 );
    g_HUD.AddButton( IDC_CHANGEDEVICE, L"Change device (F2)", 0, iY += iYo, 170, 22, VK_F2 );

    iY = 0;
    g_SampleUI.AddCheckBox( IDC_TOGGLERESIDENCYVIEWS, L"Show residency view render", 0, iY += iYo, 0, 22, g_bDrawResidencySampleViews );
    g_SampleUI.AddCheckBox( IDC_TOGGLETERRAINVIEW, L"Terrain render", 0, iY += iYo, 0, 22, g_bDrawTerrain );
    g_SampleUI.AddCheckBox( IDC_PAUSESTREAMING, L"Pause streaming", 0, iY += iYo, 0, 22, g_bPauseStreaming );

    g_SampleUI.SetCallback( OnGUIEvent );
}
开发者ID:kingofthebongo2008,项目名称:examples,代码行数:23,代码来源:TiledResources11.cpp

示例11:

Sas::Control::Checkbox::Checkbox(ID3DX11EffectVariable* variable, CDXUTDialog& ui, int& nextControlPos, int& nextControlId, std::map<int, Sas::Control::Base*>& idMap)
    :Base(variable)
{
    std::wstringstream wss;
    float value;
    variable->AsScalar()->GetFloat(&value);
    wss << label;
    idMap[nextControlId] = this;
    ui.AddCheckBox( nextControlId++, wss.str().c_str(), 5, nextControlPos, 100, 22, value, 0, false, &checkbox);
    nextControlPos += 24;
}
开发者ID:RuntimeException,项目名称:GrGame,代码行数:11,代码来源:Checkbox.cpp

示例12: InitApp

// Initialize the app 
void InitApp()
{
	// Initialize dialogs
	gD3DSettingsDlg.Init(&gDialogResourceManager);
	gHUD.Init(&gDialogResourceManager);
	gSampleUI.Init(&gDialogResourceManager);

	gHUD.SetCallback(OnGUIEvent);
	int x = 0;
	int y = 10;
	gHUD.AddButton(IDC_TOGGLEFULLSCREEN, L"Toggle full screen", x, y, 170, 23);
	gHUD.AddButton(IDC_TOGGLEREF, L"Toggle REF (F3)", x, y += 26, 170, 23, VK_F3);
	gHUD.AddButton(IDC_CHANGEDEVICE, L"Change device (F2)", x, y += 26, 170, 23, VK_F2);
	gHUD.SetSize( 170, 170 );
	
	gSampleUI.SetCallback(OnGUIEvent);
	x = 0;
	y = 0;
    gSampleUI.AddStatic(IDC_TEXT, L"", x, y, 1, 1); y += 5*22;
	gSampleUI.AddComboBox(IDC_PROFILE, x, y, 226, 22); y += 26;
	gSampleUI.AddCheckBox(IDC_MT, L"Multithreaded", x, y, 125, 22, gMultithreaded);
	gSampleUI.AddButton(IDC_RECOMPRESS, L"Recompress", x + 131, y, 125, 22); y += 26;
	gSampleUI.AddComboBox(IDC_IMAGEVIEW, x, y, 145, 22);
    gSampleUI.AddCheckBox(IDC_ALPHA, L"Show Alpha", x + 151, y, 105, 22); y += 26;
    gSampleUI.AddSlider(IDC_EXPOSURE, x, y, 250, 22); y += 26;
	gSampleUI.AddButton(IDC_LOAD_TEXTURE, L"Load Texture", x, y, 125, 22);
	gSampleUI.AddButton(IDC_SAVE_TEXTURE, L"Save Texture", x + 131, y, 125, 22); y += 26;

	gSampleUI.SetSize( 276, y+150 );

	{
		CDXUTComboBox *comboBox = gSampleUI.GetComboBox(IDC_IMAGEVIEW);
		comboBox->AddItem(L"Uncompressed", (void *)(eImageView_Uncompressed));
		comboBox->AddItem(L"Compressed", (void *)(eImageView_Compressed));
		//comboBox->AddItem(L"Error", (void *)(eImageView_Error));
		//comboBox->AddItem(L"All", (void *)(eImageView_All));
		comboBox->SetSelectedByData((void *)(gImageView));
	}

	gSampleUI.SendEvent(IDC_TEXT, true, gSampleUI.GetStatic(IDC_TEXT));
}
开发者ID:Nuos,项目名称:ISPCTextureCompressor,代码行数:42,代码来源:main.cpp

示例13: InitApp

//--------------------------------------------------------------------------------------
// Initialize the app 
//--------------------------------------------------------------------------------------
void InitApp()
{
    static const XMVECTORF32 s_vLightDir = { -1.f, 1.f, -1.f, 0.f };
    XMVECTOR vLightDir = XMVector3Normalize( s_vLightDir );
    g_LightControl.SetLightDirection( vLightDir );

    // Initialize dialogs
    g_D3DSettingsDlg.Init( &g_DialogResourceManager );
    g_HUD.Init( &g_DialogResourceManager );
    g_SampleUI.Init( &g_DialogResourceManager );

    g_HUD.SetCallback( OnGUIEvent ); int iY = 25;
    g_HUD.AddButton( IDC_TOGGLEFULLSCREEN, L"Toggle full screen", 0, iY, 170, 22 );
    g_HUD.AddButton( IDC_TOGGLEREF, L"Toggle REF (F3)", 0, iY += 26, 170, 22, VK_F3 );
    g_HUD.AddButton( IDC_CHANGEDEVICE, L"Change device (F2)", 0, iY += 26, 170, 22, VK_F2 );
    g_HUD.AddButton( IDC_TOGGLEWIRE, L"Toggle Wires (F4)", 0, iY += 26, 170, 22, VK_F4 );

    // Material Controls
    iY = 10;
    g_SampleUI.AddRadioButton( IDC_MATERIAL_PLASTIC, IDC_MATERIAL_GROUP, L"Plastic", 0, iY += 26, 170, 22 );
    g_SampleUI.AddRadioButton( IDC_MATERIAL_PLASTIC_TEXTURED, IDC_MATERIAL_GROUP, L"Plastic Textured", 0, iY += 26, 170, 22 );
    g_SampleUI.AddRadioButton( IDC_MATERIAL_ROUGH, IDC_MATERIAL_GROUP, L"Rough", 0, iY += 26, 170, 22 );
    g_SampleUI.AddRadioButton( IDC_MATERIAL_ROUGH_TEXTURED, IDC_MATERIAL_GROUP, L"Rough Textured", 0, iY += 26, 170, 22 );
    auto pRadioButton = g_SampleUI.GetRadioButton( IDC_MATERIAL_PLASTIC_TEXTURED );
    pRadioButton->SetChecked( true );

    iY += 24;
    // Lighting Controls
    g_SampleUI.AddRadioButton( IDC_LIGHT_CONST_AMBIENT, IDC_AMBIENT_LIGHTING_GROUP, L"Constant Ambient", 0, iY += 26, 170, 22 );
    g_SampleUI.AddRadioButton( IDC_LIGHT_HEMI_AMBIENT, IDC_AMBIENT_LIGHTING_GROUP, L"Hemi Ambient", 0, iY += 26, 170, 22 );
    pRadioButton = g_SampleUI.GetRadioButton( IDC_LIGHT_CONST_AMBIENT );
    pRadioButton->SetChecked( true );

    g_SampleUI.AddCheckBox( IDC_LIGHT_DIRECT, L"Direct Lighting", 0, iY += 26, 170, 22, g_bDirectLighting );
    g_SampleUI.AddCheckBox( IDC_LIGHTING_ONLY, L"Lighting Only", 0, iY += 26, 170, 22, g_bLightingOnly );

    g_SampleUI.SetCallback( OnGUIEvent ); 

}
开发者ID:AndreAhmed,项目名称:directx-sdk-samples,代码行数:42,代码来源:DynamicShaderLinkageFX11.cpp

示例14: InitApp

//--------------------------------------------------------------------------------------
// Initialize the app 
//--------------------------------------------------------------------------------------
void InitApp()
{
    g_D3DSettingsDlg.Init( &g_DialogResourceManager );
    g_HUD.Init( &g_DialogResourceManager );
    g_SampleUI.Init( &g_DialogResourceManager );

    g_HUD.SetCallback( OnGUIEvent ); int iY = 10;
    g_HUD.AddButton( IDC_TOGGLEFULLSCREEN, L"Toggle full screen", 35, iY, 125, 22 );
    g_HUD.AddButton( IDC_CHANGEDEVICE, L"Change device (F2)", 35, iY += 24, 125, 22, VK_F2 );
    g_HUD.AddButton( IDC_TOGGLEREF, L"Toggle REF (F3)", 35, iY += 24, 125, 22, VK_F3 );
    g_HUD.AddButton( IDC_TOGGLEWARP, L"Toggle WARP (F4)", 35, iY += 24, 125, 22, VK_F4 );
    g_SampleUI.SetCallback( OnGUIEvent ); iY = 10;

    CDXUTCheckBox* pCheckBox = NULL;
    g_SampleUI.AddCheckBox( IDC_TOGGLE_BLUR, L"Use Motion Blur", 0, 105, 140, 24, true, 0, false, &pCheckBox );
    g_SampleUI.AddCheckBox( IDC_RENDER_OGRE, L"Render Ogre", 0, 129, 140, 24, true, 0, false, &pCheckBox );

    g_SampleUI.AddStatic( IDC_STATIC, L"MSAA (S)amples", 0, 180, 105, 25 );

    CDXUTComboBox* pComboBox = NULL;
    g_SampleUI.AddComboBox( IDC_SAMPLE_COUNT, 0, 205, 140, 24, 'S', false, &pComboBox );
    if( pComboBox )
        pComboBox->SetDropHeight( 30 );
}
开发者ID:marselas,项目名称:Zombie-Direct3D-Samples,代码行数:27,代码来源:MotionBlur10.cpp

示例15: InitApp

//--------------------------------------------------------------------------------------
// Initialize the app 
//--------------------------------------------------------------------------------------
void InitApp()
{
    g_D3DSettingsDlg.Init( &g_DialogResourceManager );
    g_HUD.Init( &g_DialogResourceManager );
    g_SampleUI.Init( &g_DialogResourceManager );

    g_HUD.SetCallback( OnGUIEvent ); int iY = 10;
    g_HUD.AddButton( IDC_TOGGLEFULLSCREEN, L"Toggle full screen", 0, iY, 170, 23 );
    g_HUD.AddButton( IDC_TOGGLEREF, L"Toggle REF (F3)", 0, iY += 26, 170, 23, VK_F3 );
    g_HUD.AddButton( IDC_CHANGEDEVICE, L"Change device (F2)", 0, iY += 26, 170, 23, VK_F2 );

    iY = 0;
    g_SampleUI.AddCheckBox( IDC_SHOWTESSELLATED, L"Show (t)essellated", 0, iY += 26, 125, 22, g_bShowTessellated, 'T' );
    g_SampleUI.AddRadioButton( IDC_PARTITIONING_INTEGER, 0, L"Integer Partitioning(1)", 0, iY += 39, 125, 22, false, '1' );
    g_SampleUI.AddRadioButton( IDC_PARTITIONING_POW2, 0, L"Pow2 Partitioning(2)", 0, iY += 26, 125, 22, false, '2' );
    g_SampleUI.AddRadioButton( IDC_PARTITIONING_FRACTIONAL_ODD, 0, L"Odd Fractional Partitioning(3)", 0, iY += 26, 125, 22, false, '3' );
    g_SampleUI.AddRadioButton( IDC_PARTITIONING_FRACTIONAL_EVEN, 0, L"Even Fractional Partitioning(4)", 0, iY += 26, 125, 22, true, '4' );
    g_SampleUI.SetCallback( OnGUIEvent ); 
}
开发者ID:AndreAhmed,项目名称:directx-sdk-samples,代码行数:22,代码来源:AdaptiveTessellationCS40.cpp


注:本文中的CDXUTDialog::AddCheckBox方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。