Added processing of mouse double click in ImGuiWrapper::update_mouse_data()

This commit is contained in:
enricoturri1966 2022-07-29 12:06:52 +02:00
parent 86a5280ff6
commit f9c6e8eb7a

View File

@ -230,6 +230,9 @@ bool ImGuiWrapper::update_mouse_data(wxMouseEvent& evt)
io.MouseDown[0] = evt.LeftIsDown();
io.MouseDown[1] = evt.RightIsDown();
io.MouseDown[2] = evt.MiddleIsDown();
io.MouseDoubleClicked[0] = evt.LeftDClick();
io.MouseDoubleClicked[1] = evt.RightDClick();
io.MouseDoubleClicked[2] = evt.MiddleDClick();
float wheel_delta = static_cast<float>(evt.GetWheelDelta());
if (wheel_delta != 0.0f)
io.MouseWheel = static_cast<float>(evt.GetWheelRotation()) / wheel_delta;