diff options
Diffstat (limited to 'sword2/console.cpp')
-rw-r--r-- | sword2/console.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sword2/console.cpp b/sword2/console.cpp index 4d9acfe3fc..fdb0088751 100644 --- a/sword2/console.cpp +++ b/sword2/console.cpp @@ -302,12 +302,17 @@ bool Debugger::Cmd_Var(int argc, const char **argv) { } bool Debugger::Cmd_Rect(int argc, const char **argv) { + uint32 filter = _vm->setEventFilter(0); + _definingRectangles = !_definingRectangles; - if (_definingRectangles) + if (_definingRectangles) { + _vm->setEventFilter(filter & ~(RD_LEFTBUTTONUP | RD_RIGHTBUTTONUP)); DebugPrintf("Mouse rectangles enabled\n"); - else + } else { + _vm->setEventFilter(filter | RD_LEFTBUTTONUP | RD_RIGHTBUTTONUP); DebugPrintf("Mouse rectangles disabled\n"); + } _draggingRectangle = 0; return true; |