Commit graph

201 commits

Author SHA1 Message Date
thefiddler c6989395df [Input] Added GameWindow.Mouse/Keyboard.GetState()
GameWindow.Mouse/Keyboard hide OpenTK.Input.Mouse/Keyboard.
To simplify usage, the former now provide the same methods
as the latter.
2014-09-11 01:03:24 +02:00
thefiddler e5cd6a3b9e [Input] Implemented JoystickHat GamePad mapping 2014-07-25 23:26:03 +02:00
thefiddler 7c55e4e9ec [Input] Corrected invalid GUID in GamePad database 2014-07-24 01:10:22 +02:00
thefiddler 3e9b2005d1 [Input] Sync GamePad database with SDL 2.0.4 2014-07-24 00:19:41 +02:00
thefiddler 00b531fdef Fixed compilation warnings on Mono 3.4.0 2014-07-21 17:46:39 +02:00
thefiddler 461fbce45f Cleaned up a number of obsolete warnings 2014-07-21 16:39:58 +02:00
thefiddler ead151ea4f Fixed a large number of warnings 2014-07-21 16:03:37 +02:00
thefiddler 340d34b07b [Input] MouseState position is now stored in floating point
Several platforms provide subpixel accuracy for mouse position.
OpenTK can now take advantage of that.
2014-07-16 14:28:27 +02:00
thefiddler 3febb4dda0 [Input] Renamed MouseScrollWheel to MouseScroll
This better describes the functionality of this structure.
2014-05-13 23:25:56 +02:00
thefiddler c6dafbccba [X11] Implemented high-resolution scroll events 2014-05-13 23:23:51 +02:00
thefiddler bb8dfe4304 [Input] Improve SDL2 and Windows GetCursorState 2014-05-12 02:20:52 +02:00
thefiddler f4a3cab0e0 [Input] Added Mouse.GetCursorPos() (WIP) 2014-05-12 02:20:52 +02:00
thefiddler c98b4ea178 [Input] Do not hook FocusedChanged
This is handled by NativeWindowBase now.
2014-05-09 15:23:39 +02:00
thefiddler 8b7d5bc7e4 [Input] Implement key repeat 2014-05-05 00:43:45 +02:00
thefiddler d968281a1b [OpenTK] Refactor keyboard and mouse handling
A lot of duplicated code is now moved to NativeWindowBase and
LegacyInputDriver.
2014-05-04 17:05:08 +02:00
thefiddler 268e8fccde [Input] Removed pointless unsafe region 2014-05-04 17:01:34 +02:00
thefiddler 1096a8802a [Input] Removed pointless ValuePrecise setter 2014-05-04 16:58:59 +02:00
thefiddler 7af710f4dd [Input] Removed pointless MouseDevice.SetState
MouseDevice state should only be modified through its HandleMouse*
methods, not directly.
2014-05-04 16:58:24 +02:00
thefiddler 67359a5d90 [Input] MouseDevice is now based on MouseState
This way we have a single state representation (MouseState), shared by
all mouse APIs and events.
2014-05-04 08:33:20 +02:00
thefiddler 39eb3b1892 [Input] Improved MouseState.ToString() 2014-05-04 08:31:11 +02:00
thefiddler 94fdf1881c [Platform] Improved mouse interface
- The complete mouse state is now available in mouse events
- Horizontal wheels are now supported
- MouseState now takes up less memory and has a simpler internal
implementation.
2014-05-04 01:29:55 +02:00
thefiddler e85377c350 [Platform] Added support for horizontal wheel 2014-05-03 16:47:03 +02:00
thefiddler 3e33ac9280 [Platform] Refactored INativeWindow backends
All INativeWindow implementations are now derived from
NativeWindowBase. They no longer implement legacy IInputDriver
themselves, but rather rely on LegacyInputDriver provided by
NativeWindowBase for compatibility. They also implement the new Mouse*
events.
2014-05-02 16:52:11 +02:00
thefiddler 612652910f [Platform] Inherit NativeWindowBase 2014-05-02 14:18:40 +02:00
thefiddler 24b19d2487 [Input] Added internal MouseDevice.Position getter 2014-05-02 09:37:25 +02:00
thefiddler d03e9d82dc [Input] Fixed key modifiers in KeyboardDevice events 2014-04-27 22:27:18 +02:00
thefiddler 3658fac263 [Input] Use Key.LastKey instead of Enum.GetValues
This avoids unnecessary memory allocations in the KeyboardDevice
constructor.
2014-04-25 14:15:06 +02:00
thefiddler f93d464f62 [Input] JoystickHatState is now IEquatable 2014-03-17 00:30:04 +01:00
thefiddler 01c3b51be6 [Input] JoystickState.ToString now prints hat pos 2014-03-17 00:29:45 +01:00
thefiddler c92aabd807 [Input] Implemented GetModifiers() method 2014-02-25 01:13:45 +01:00
thefiddler 221d4661d4 [Input] Added modifier keys to KeyboardKeyEventArgs 2014-02-25 01:13:45 +01:00
thefiddler 4066ba8355 [Input] Added KeyModifiers enumeration
KeyModifiers are represented as a bitwise combination of the Alt,
Control and Shift keys.
2014-02-25 01:13:45 +01:00
thefiddler ae3f8cff55 [Doc] Fixed doxygen latex-to-pdf conversion
pdflatex will fail when a <seealso> elements is placed within a
<summary> element. This is now fixed.
2014-02-16 15:30:22 +01:00
Stefanos A. 2dee96d918 [Input] Fixed SetButton index check 2014-01-31 16:40:57 +01:00
Stefanos A. 4fceca2f80 [Input] Fixed compilation error 2014-01-31 16:37:36 +01:00
thefiddler a7228274aa [Input] Added JoystickCapabilities.HatCount 2014-01-31 15:40:07 +01:00
thefiddler 801d6ead04 [Input] Added hat state to JoystickState 2014-01-31 15:03:30 +01:00
thefiddler 0cacdf6ae4 [Input] Do not use a bitfield for hat position
Using a bitfield does not save storage space in this case, and also
stops pattern matching from working (switch() statement in C# or match
… with expressions in F#.)
2014-01-31 15:03:19 +01:00
thefiddler a4ce2182d2 [Input] Added JoystickHatState structure 2014-01-31 15:01:35 +01:00
thefiddler 5fe2d60857 [Input] Added structures for joystick hat input 2014-01-30 17:40:26 +01:00
thefiddler 41a23ca371 [Input] Fixed off-by-one error in internal max axes/buttons 2014-01-30 17:36:59 +01:00
thefiddler ef429aff01 [Input] Added support for JoystickButtons 16-31 2014-01-29 10:28:06 +01:00
thefiddler cd42f92c12 [Input] Corrected GamePadState range to byte [0,255] 2014-01-25 17:05:06 +01:00
thefiddler 44e2576c86 [OpenTK] Protect against invalid axis/button ids 2014-01-15 01:24:20 +01:00
thefiddler 4d660fdeba [Input] Added Keyboard/MouseState.SetIsConnected to mirror JoystickState 2014-01-05 23:50:17 +01:00
thefiddler 92635b3f35 [Input] Added JoystickAxis/Button.Last; added JoystickAxis.Axis10.
JoystickAxis/Button.Last is used internally to allocate the correct
amount of storage for joystick axes and buttons. JoystickAxis.Axis10 is
required to support the maximum number of axes available on Mac OS X.
2014-01-05 03:54:34 +01:00
thefiddler 3757db9978 [Input] Allow extending JoystickDevice<> 2014-01-05 00:46:59 +01:00
thefiddler 3a63496b6d Merge branch 'gamepad' into develop
Conflicts:
	Source/OpenTK/OpenTK.csproj
2014-01-03 02:23:02 +01:00
thefiddler 53552b0070 [Input] Corrected malformed documentation comments 2014-01-03 02:17:42 +01:00
thefiddler 3095afa18a [Input] Documented all public members 2014-01-03 01:58:16 +01:00