Scrolling Game Development Kit Forum
SGDK Version 2 => Help, Errors, FAQ => Topic started by: eric22222 on 2014-04-26, 01:54:57 PM
-
Is there any method built-in that will let me check if the mouse wheel has been scrolled? IsMouseButtonPressed let's me check if the mouse wheel is clicked, but I'm looking for scroll up/down events.
-
Got a solution: in GameForm.cs, add this line to the InitializeComponent function:
this.MouseWheel += new System.Windows.Forms.MouseEventHandler(this.MouseWheelHandler);
And add in this function:
private void MouseWheelHandler(object sender, System.Windows.Forms.MouseEventArgs e) {
MessageBox.Show(e.Delta.ToString());
}
Not really built-in, but it works. Bluemonkmn, thanks for making all the classes easy to access :)