diff --git a/Quickstart.md b/Quickstart.md index 882af23..75a67ad 100644 --- a/Quickstart.md +++ b/Quickstart.md @@ -24,6 +24,7 @@ If you already have an app running by definition you shouldn't have this problem - (6) End of main loop: call `ImGui::Render()` + call Render function of Rendering backend. - (7) Most backends requires extra steps to hook or forward events. - (8) Shutdown backends, destroy Dear ImGui context with `ImGui::DestroyContext()`. +- (9) In your application input logic: you can poll `ImGui::GetIO().WantCaptureMouse`/`WantCaptureKeyboard` to tell if Dear ImGui wants to obstruct mouse/keyboard inputs from underlying apps. e.g. when hovering a window WantCaptureMouse will be set to true. ## Example: If you are using Raw Win32 API + DirectX11 @@ -52,7 +53,6 @@ ImGui_ImplDX11_Init(YOUR_D3D_DEVICE, YOUR_D3D_DEVICE_CONTEXT); Add to start of main loop: ```cpp // (Your code process and dispatch Win32 messages) -... // Start the Dear ImGui frame ImGui_ImplDX11_NewFrame(); ImGui_ImplWin32_NewFrame(); @@ -72,6 +72,7 @@ Add to your WndProc handler: extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); if (ImGui_ImplWin32_WndProcHandler(hWnd, msg, wParam, lParam)) return true; +(Your code process Windows messages. Read from `ImGui::GetIO().WantCaptureMouse`/`WantCaptureKeyboard` to tell if Dear ImGui should obstruct mouse/keyboard from your underlying application) ``` Add to Shutdown: ```cpp @@ -129,4 +130,4 @@ ImGui_ImplOpenGL3_Shutdown(); ImGui_ImplGlfw_Shutdown(); ImGui::DestroyContext(); ``` -That should be all! \ No newline at end of file +That should be all!