aboutsummaryrefslogtreecommitdiff
path: root/NvCloth/samples/SampleBase/ui
diff options
context:
space:
mode:
Diffstat (limited to 'NvCloth/samples/SampleBase/ui')
-rw-r--r--NvCloth/samples/SampleBase/ui/CommonUIController.cpp8
-rw-r--r--NvCloth/samples/SampleBase/ui/CommonUIController.h2
2 files changed, 8 insertions, 2 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();
}
diff --git a/NvCloth/samples/SampleBase/ui/CommonUIController.h b/NvCloth/samples/SampleBase/ui/CommonUIController.h
index 47953b7..04b7a20 100644
--- a/NvCloth/samples/SampleBase/ui/CommonUIController.h
+++ b/NvCloth/samples/SampleBase/ui/CommonUIController.h
@@ -85,7 +85,7 @@ class CommonUIController : public ISampleController
std::queue<DelayedCall> m_delayedCalls;
float m_dt;
-
+ bool m_drawGui;
};
#endif \ No newline at end of file