|Project:||The Open Toolkit library|
These classes should be independent of the GameWindow and usable on their own. Proposed API:
MouseState OpenTK.Input.Mouse.GetState(int index); KeyboardState OpenTK.Input.Keyboard.GetState(int index); GamePadState OpenTK.Input.GamePad.GetState(int index);
[Mouse|Keyboard|GamePad]State are structs that encapsulate the state vector of the relevant device at the time when GetState was called. 'Index' is an optional parameter that specifies which device is queried, when multiple devices are connected to the computer. It is not an error to query a device index for a non-existent device: in that case, the state vector will indicate IsConnected = false.
Device indices may not after application startup. For example, if the computer has 3 devices (0, 1, 2) and device 1 is disconnected, the indices of the other devices may not change: they shall remain (0, 2).