aboutsummaryrefslogtreecommitdiff
path: root/NvCloth/samples/SampleBase/ui/CommonUIController.cpp
diff options
context:
space:
mode:
authorMarijn Tamis <[email protected]>2018-05-03 18:22:48 +0200
committerMarijn Tamis <[email protected]>2018-05-03 18:22:48 +0200
commitca32c59a58d37c1822e185a2d5f3d0d3e8943593 (patch)
treeb06b9eec03f34344ef8fc31aa147b2714d3962ee /NvCloth/samples/SampleBase/ui/CommonUIController.cpp
parentForced rename of platform folders in cmake dir. Git didn't pick this up before. (diff)
downloadnvcloth-ca32c59a58d37c1822e185a2d5f3d0d3e8943593.tar.xz
nvcloth-ca32c59a58d37c1822e185a2d5f3d0d3e8943593.zip
NvCloth 1.1.4 Release. (24070740)
Diffstat (limited to 'NvCloth/samples/SampleBase/ui/CommonUIController.cpp')
-rw-r--r--NvCloth/samples/SampleBase/ui/CommonUIController.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/NvCloth/samples/SampleBase/ui/CommonUIController.cpp b/NvCloth/samples/SampleBase/ui/CommonUIController.cpp
index 492e3e9..29470d2 100644
--- a/NvCloth/samples/SampleBase/ui/CommonUIController.cpp
+++ b/NvCloth/samples/SampleBase/ui/CommonUIController.cpp
@@ -31,6 +31,7 @@ inline float memorySizeOutput(const char*& prefix, float value)
CommonUIController::CommonUIController()
{
+ m_drawGui = true;
}
HRESULT CommonUIController::DeviceCreated(ID3D11Device* pDevice)
@@ -104,6 +105,10 @@ LRESULT CommonUIController::MsgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM
getRenderer().reloadShaders();
break;
}
+ case VK_OEM_3: //`~ key
+ {
+ m_drawGui = !m_drawGui;
+ }
default:
break;
}
@@ -123,7 +128,8 @@ void CommonUIController::Animate(double fElapsedTimeSeconds)
void CommonUIController::Render(ID3D11Device*, ID3D11DeviceContext*, ID3D11RenderTargetView*, ID3D11DepthStencilView*)
{
ImGui_ImplDX11_NewFrame();
- drawUI();
+ if(m_drawGui)
+ drawUI();
ImGui::Render();
}