The engine now uses the SDL2.0 scroll events properly.

Scroll speed is now a user preference.
This commit is contained in:
Saticmotion
2014-05-12 22:04:18 +02:00
parent bad6a99caf
commit 1bf3f3e03e
14 changed files with 69 additions and 57 deletions

View File

@@ -20,19 +20,21 @@ namespace OpenRA
void OnTextInput(string text);
}
public enum MouseInputEvent { Down, Move, Up }
public enum MouseInputEvent { Down, Move, Up, Scroll }
public struct MouseInput
{
public MouseInputEvent Event;
public MouseButton Button;
public int ScrollDelta;
public int2 Location;
public Modifiers Modifiers;
public int MultiTapCount;
public MouseInput(MouseInputEvent ev, MouseButton button, int2 location, Modifiers mods, int multiTapCount)
public MouseInput(MouseInputEvent ev, MouseButton button, int scrollDelta, int2 location, Modifiers mods, int multiTapCount)
{
Event = ev;
Button = button;
ScrollDelta = scrollDelta;
Location = location;
Modifiers = mods;
MultiTapCount = multiTapCount;
@@ -45,9 +47,7 @@ namespace OpenRA
None = 0,
Left = 1,
Right = 2,
Middle = 4,
WheelDown = 8,
WheelUp = 16
Middle = 4
}
[Flags]