Skip to content
This repository has been archived by the owner on Sep 18, 2022. It is now read-only.

Commit

Permalink
Updated Mouse input handler
Browse files Browse the repository at this point in the history
  • Loading branch information
craftersmine committed Feb 27, 2019
1 parent 6008114 commit 051de7e
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions craftersmine.EtherEngine.Input/Mouse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,13 @@ namespace craftersmine.EtherEngine.Input
{
public sealed class Mouse
{
static Mouse()
{
MouseDevice.WheelChanged += MouseDevice_WheelChanged;
MouseDevice.ButtonDown += MouseDevice_ButtonDown;
MouseDevice.ButtonUp += MouseDevice_ButtonUp;
MouseDevice.Move += MouseDevice_Move;
}

private static void MouseDevice_Move(object sender, MouseMoveEventArgs e)
public static void MouseDeviceMoveEvent(object sender, MouseMoveEventArgs e)
{
XDelta = e.XDelta;
YDelta = e.YDelta;
}

private static void MouseDevice_ButtonUp(object sender, MouseButtonEventArgs e)
public static void MouseDeviceButtonUpEvent(object sender, MouseButtonEventArgs e)
{
switch (e.Button)
{
Expand All @@ -39,7 +31,7 @@ private static void MouseDevice_ButtonUp(object sender, MouseButtonEventArgs e)
}
}

private static void MouseDevice_ButtonDown(object sender, MouseButtonEventArgs e)
public static void MouseDeviceButtonDownEvent(object sender, MouseButtonEventArgs e)
{
switch (e.Button)
{
Expand All @@ -55,7 +47,7 @@ private static void MouseDevice_ButtonDown(object sender, MouseButtonEventArgs e
}
}

private static void MouseDevice_WheelChanged(object sender, MouseWheelEventArgs e)
public static void MouseDeviceWheelChangedEvent(object sender, MouseWheelEventArgs e)
{
WheelDelta = e.Delta;
}
Expand Down

0 comments on commit 051de7e

Please sign in to comment.