|
@@ -120,10 +120,7 @@ int main(int, char**)
|
|
|
while (!done)
|
|
|
{
|
|
|
// Poll and handle messages (inputs, window resize, etc.)
|
|
|
- // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
|
|
|
- // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
|
|
|
- // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
|
|
|
- // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
|
|
|
+ // See the WndProc() function below for our to dispatch events to the Win32 backend.
|
|
|
MSG msg;
|
|
|
while (::PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE))
|
|
|
{
|
|
@@ -435,6 +432,10 @@ FrameContext* WaitForNextFrameResources()
|
|
|
extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
// Win32 message handler
|
|
|
+// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
|
|
|
+// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
|
|
|
+// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
|
|
|
+// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
|
|
|
LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|
|
{
|
|
|
if (ImGui_ImplWin32_WndProcHandler(hWnd, msg, wParam, lParam))
|