Implement consumption of mouse events.

This commit is contained in:
Bartosz Taudul 2020-08-01 12:10:59 +02:00
parent 6d0d12ce78
commit 22651eccc5
2 changed files with 10 additions and 0 deletions

View File

@ -48,4 +48,12 @@ ImVec2 GetMouseDragDelta( ImGuiMouseButton button )
return s_mouse.mouseDragDelta[button];
}
void ConsumeMouseEvents( ImGuiMouseButton button )
{
s_mouse.mouseDown[button] = false;
s_mouse.mouseClicked[button] = false;
s_mouse.mouseDragging[button] = false;
s_mouse.mouseDragDelta[button] = ImVec2( 0, 0 );
}
}

View File

@ -13,6 +13,8 @@ bool IsMouseClicked( ImGuiMouseButton button );
bool IsMouseDragging( ImGuiMouseButton button );
ImVec2 GetMouseDragDelta( ImGuiMouseButton button );
void ConsumeMouseEvents( ImGuiMouseButton button );
}
#endif