summaryrefslogtreecommitdiffstats
path: root/src/Render.cpp
diff options
context:
space:
mode:
authorElisey Puzko <puzko.e02@gmail.com>2018-02-23 10:47:46 +0100
committerElisey Puzko <puzko.e02@gmail.com>2018-02-23 10:47:46 +0100
commit05126872d522a3a031086dcce866de9643f38c3f (patch)
tree6e2a88e0f97901e2f0d0853271348b8610df9f4b /src/Render.cpp
parentRemoved redundant header (diff)
downloadAltCraft-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.cpp4
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)