diff options
author | Elisey Puzko <puzko.e02@gmail.com> | 2018-02-23 10:47:46 +0100 |
---|---|---|
committer | Elisey Puzko <puzko.e02@gmail.com> | 2018-02-23 10:47:46 +0100 |
commit | 05126872d522a3a031086dcce866de9643f38c3f (patch) | |
tree | 6e2a88e0f97901e2f0d0853271348b8610df9f4b /src/Render.cpp | |
parent | Removed redundant header (diff) | |
download | AltCraft-05126872d522a3a031086dcce866de9643f38c3f.tar AltCraft-05126872d522a3a031086dcce866de9643f38c3f.tar.gz AltCraft-05126872d522a3a031086dcce866de9643f38c3f.tar.bz2 AltCraft-05126872d522a3a031086dcce866de9643f38c3f.tar.lz AltCraft-05126872d522a3a031086dcce866de9643f38c3f.tar.xz AltCraft-05126872d522a3a031086dcce866de9643f38c3f.tar.zst AltCraft-05126872d522a3a031086dcce866de9643f38c3f.zip |
Diffstat (limited to 'src/Render.cpp')
-rw-r--r-- | src/Render.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Render.cpp b/src/Render.cpp index c905bd9..5c00d91 100644 --- a/src/Render.cpp +++ b/src/Render.cpp @@ -245,7 +245,7 @@ void Render::HandleEvents() { } case SDL_MOUSEBUTTONDOWN: { - if (!ImGui::GetIO().WantCaptureMouse) { + if (isMouseCaptured && !ImGui::GetIO().WantCaptureMouse) { if (event.button.button == SDL_BUTTON_LEFT) PUSH_EVENT("LmbPressed", 0); else if (event.button.button == SDL_BUTTON_RIGHT) @@ -256,7 +256,7 @@ void Render::HandleEvents() { } case SDL_MOUSEBUTTONUP: { - if (!ImGui::GetIO().WantCaptureMouse) { + if (isMouseCaptured && !ImGui::GetIO().WantCaptureMouse) { if (event.button.button == SDL_BUTTON_LEFT) PUSH_EVENT("LmbReleased", 0); else if (event.button.button == SDL_BUTTON_RIGHT) |