Skip to content

Commit

Permalink
Update mouse_wheel_h for imgui integration (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
fangjunzhou authored Dec 25, 2024
1 parent 93349b9 commit 1f3f07b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions moderngl_window/integrations/imgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def mouse_drag_event(self, x, y, dx, dy):
self.io.mouse_down[1] = 1

def mouse_scroll_event(self, x_offset, y_offset):
self.io.mouse_wheel_h = x_offset
self.io.mouse_wheel = y_offset

def mouse_press_event(self, x, y, button):
Expand Down
1 change: 1 addition & 0 deletions moderngl_window/integrations/imgui_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def mouse_drag_event(self, x, y, dx, dy):
self.io.mouse_down[1] = 1

def mouse_scroll_event(self, x_offset, y_offset):
self.io.mouse_wheel_h = x_offset
self.io.mouse_wheel = y_offset

def mouse_press_event(self, x, y, button):
Expand Down

0 comments on commit 1f3f07b

Please sign in to comment.