Skip to content
This repository has been archived by the owner on Jan 4, 2023. It is now read-only.

Add support for mouse scroll wheel, middle click, and Xbutton1/Xbutton2 #125

Closed
wants to merge 1 commit into from

Conversation

PureAsbestos
Copy link

@PureAsbestos PureAsbestos commented Apr 7, 2020

Adds a new method to the API, MouseWheel, that returns an integer value that reflects how much the scroll wheel has moved since the last frame. Also adds an enum, ScrollDirection (Vertical and Horizontal), that can be passed to MouseWheel to indicate the scroll axis to poll. Default is Vertical. Horizontal scrolling support is especially useful for gesture-based scrolling on, say, a Mac.
Also adds support to MouseButton for middle (3), button1/back (4) and button2/forward (5).

@PureAsbestos
Copy link
Author

Since ScrollDirection.Horizontal is a bit of a mouthful, you might consider changing that

@jessefreeman
Copy link
Collaborator

I took a look at your pull request but simplified it and put it in by hand. MouseWheel() just returns a point with the change in x,y value since the last frame. No need for the new scroll enum.

I've added this to the 1.9.8 branch.

@jessefreeman jessefreeman self-assigned this Apr 26, 2020
@jessefreeman jessefreeman added this to the Release v1.9.8 milestone Apr 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
PV8 Runner
  
Awaiting triage
Pixel Vision Intergation
  
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

2 participants