Fix mouse up event for imgui based widgets
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
fc1fb75123
commit
e0f12a9998
2 changed files with 2 additions and 6 deletions
|
@ -270,16 +270,12 @@ void ImGuiWidget::onDragHover(const DragHoverEvent& e)
|
|||
}
|
||||
}
|
||||
|
||||
void ImGuiWidget::onDragLeave(const DragLeaveEvent& e)
|
||||
void ImGuiWidget::onDragEnd(const DragEndEvent& e)
|
||||
{
|
||||
ImGui::SetCurrentContext(imData->context);
|
||||
|
||||
// FIXME this is not the correct event..
|
||||
ImGuiIO& io(ImGui::GetIO());
|
||||
io.MouseDown[0] = io.MouseDown[1] = io.MouseDown[2] = false;
|
||||
|
||||
if (io.WantCaptureMouse)
|
||||
e.consume(this);
|
||||
}
|
||||
|
||||
void ImGuiWidget::onHoverScroll(const HoverScrollEvent& e)
|
||||
|
|
|
@ -34,7 +34,7 @@ protected:
|
|||
void onContextDestroy(const ContextDestroyEvent& e) override;
|
||||
void onHover(const HoverEvent& e) override;
|
||||
void onDragHover(const DragHoverEvent& e) override;
|
||||
void onDragLeave(const DragLeaveEvent& e) override;
|
||||
void onDragEnd(const DragEndEvent& e) override;
|
||||
void onHoverScroll(const HoverScrollEvent& e) override;
|
||||
void onButton(const ButtonEvent& e) override;
|
||||
void onSelectKey(const SelectKeyEvent& e) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue