TriEngine
v0.0.16
General-purpose engine in C#/OpenGL
|
Provides various methods to query input devices like the keyboard. More...
Public Member Functions | |
void | Update () |
Updates the input manager, refreshing all current and previous states. More... | |
bool | IsKeyUp (Key key) |
Returns whether or not the specified key is currently unpressed. More... | |
bool | IsKeyDown (Key key) |
Returns whether or not the specified key is currently being pressed. More... | |
bool | KeyPressed (Key key) |
Returns whether or not the specified key has been pressed. More... | |
bool | KeyReleased (Key key) |
Returns whether or not the specified key has been released. More... | |
bool | IsMouseUp (MouseButton button) |
Returns whether or not the specified mouse button is currently unpressed. More... | |
bool | IsMouseDown (MouseButton button) |
Returns whether or not the specified mouse button is currently being pressed. More... | |
bool | MousePressed (MouseButton button) |
Returns whether or not the specified mouse button has been pressed. More... | |
bool | MouseReleased (MouseButton button) |
Returns whether or not the specified mouse button has been released. More... | |
bool | IsWheelUp () |
Returns whether the mouse wheel was scrolled up. More... | |
bool | IsWheelDown () |
Returns whether the mouse wheel was scrolled down. More... | |
bool | IsWheelChanged () |
Returns whether the mouse wheel scrolled at all. More... | |
int | WheelChange () |
Returns the mouse wheel's change in value. More... | |
Properties | |
int | MouseX [get] |
Gets the absolute X position of the pointer, in window pixel coordinates. More... | |
int | MouseY [get] |
Gets the absolute Y position of the pointer, in window pixel coordinates. More... | |
Point< int > | MousePosition [get] |
Gets a Point representing the position of the mouse pointer, in window pixel coordinates. More... | |
int | MouseWheelValue [get] |
Gets the current value of the mouse wheel. More... | |
bool | this[Key key] [get] |
Gets a boolean value indicating whether the specified OpenTK.Input.Key is pressed. More... | |
bool | this[MouseButton button] [get] |
Gets a boolean value indicating whether the specified OpenTK.Input.MouseButton is pressed. More... | |
Events | |
KeyDownEventHandler | KeyDown |
Raised when a key is pressed down. More... | |
KeyUpEventHandler | KeyUp |
Raised when a key is released. More... | |
KeyPressEventHandler | KeyPress |
Raised when a character is typed. More... | |
MouseDownEventHandler | MouseDown |
Raised when a mouse button is pressed down. More... | |
MouseUpEventHandler | MouseUp |
Raised when a mouse button is released. More... | |
MouseWheelChangedEventHandler | WheelChanged |
Raised when the mouse wheel value changes. More... | |
MouseWheelDownEventHandler | WheelDown |
Raised when the mouse wheel is scrolled downwards. More... | |
MouseWheelUpEventHandler | WheelUp |
Raised when the mouse wheel is scrolled upwards. More... | |
Provides various methods to query input devices like the keyboard.
bool TriDevs.TriEngine.Input.IInputManager.IsKeyDown | ( | Key | key | ) |
Returns whether or not the specified key is currently being pressed.
key | Key to query for. |
Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.
bool TriDevs.TriEngine.Input.IInputManager.IsKeyUp | ( | Key | key | ) |
Returns whether or not the specified key is currently unpressed.
key | Key to query for. |
Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.
bool TriDevs.TriEngine.Input.IInputManager.IsMouseDown | ( | MouseButton | button | ) |
Returns whether or not the specified mouse button is currently being pressed.
button | The button to query for. |
Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.
bool TriDevs.TriEngine.Input.IInputManager.IsMouseUp | ( | MouseButton | button | ) |
Returns whether or not the specified mouse button is currently unpressed.
button | Button to query for. |
Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.
bool TriDevs.TriEngine.Input.IInputManager.IsWheelChanged | ( | ) |
Returns whether the mouse wheel scrolled at all.
Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.
bool TriDevs.TriEngine.Input.IInputManager.IsWheelDown | ( | ) |
Returns whether the mouse wheel was scrolled down.
Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.
bool TriDevs.TriEngine.Input.IInputManager.IsWheelUp | ( | ) |
Returns whether the mouse wheel was scrolled up.
Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.
bool TriDevs.TriEngine.Input.IInputManager.KeyPressed | ( | Key | key | ) |
Returns whether or not the specified key has been pressed.
Only returns true if the last state of the key was not pressed.
key | Key to query for. |
Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.
bool TriDevs.TriEngine.Input.IInputManager.KeyReleased | ( | Key | key | ) |
Returns whether or not the specified key has been released.
Only returns true if the last state of the key was pressed.
key | Key to query for. |
Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.
bool TriDevs.TriEngine.Input.IInputManager.MousePressed | ( | MouseButton | button | ) |
Returns whether or not the specified mouse button has been pressed.
Only returns true if the last state of the mouse button was not pressed.
button | Button to query for. |
Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.
bool TriDevs.TriEngine.Input.IInputManager.MouseReleased | ( | MouseButton | button | ) |
Returns whether or not the specified mouse button has been released.
Only returns true if the last state of the button was pressed.
button | The button to query for. |
Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.
void TriDevs.TriEngine.Input.IInputManager.Update | ( | ) |
Updates the input manager, refreshing all current and previous states.
Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.
int TriDevs.TriEngine.Input.IInputManager.WheelChange | ( | ) |
Returns the mouse wheel's change in value.
Implemented in TriDevs.TriEngine.Input.InputManager, and TriDevs.TriEngine.Input.NullInputManager.
|
get |
Gets a Point representing the position of the mouse pointer, in window pixel coordinates.
|
get |
Gets the current value of the mouse wheel.
|
get |
Gets the absolute X position of the pointer, in window pixel coordinates.
|
get |
Gets the absolute Y position of the pointer, in window pixel coordinates.
|
get |
Gets a boolean value indicating whether the specified OpenTK.Input.Key is pressed.
key | The key to query. |
|
get |
Gets a boolean value indicating whether the specified OpenTK.Input.MouseButton is pressed.
button | The button to query. |
KeyDownEventHandler TriDevs.TriEngine.Input.IInputManager.KeyDown |
Raised when a key is pressed down.
KeyPressEventHandler TriDevs.TriEngine.Input.IInputManager.KeyPress |
Raised when a character is typed.
KeyUpEventHandler TriDevs.TriEngine.Input.IInputManager.KeyUp |
Raised when a key is released.
MouseDownEventHandler TriDevs.TriEngine.Input.IInputManager.MouseDown |
Raised when a mouse button is pressed down.
MouseUpEventHandler TriDevs.TriEngine.Input.IInputManager.MouseUp |
Raised when a mouse button is released.
MouseWheelChangedEventHandler TriDevs.TriEngine.Input.IInputManager.WheelChanged |
Raised when the mouse wheel value changes.
MouseWheelDownEventHandler TriDevs.TriEngine.Input.IInputManager.WheelDown |
Raised when the mouse wheel is scrolled downwards.
MouseWheelUpEventHandler TriDevs.TriEngine.Input.IInputManager.WheelUp |
Raised when the mouse wheel is scrolled upwards.