DefaultInputProvider Class |
Namespace: GeonBit.UI
public class DefaultInputProvider : IMouseInput, IKeyboardInput
The DefaultInputProvider type exposes the following members.
Name | Description | |
---|---|---|
DefaultInputProvider |
Create the input helper.
|
Name | Description | |
---|---|---|
CurrGameTime |
Current frame game time.
| |
MousePosition |
Get current mouse poisition.
| |
MousePositionDiff |
Get mouse position change since last frame.
| |
MouseWheel |
Current mouse wheel value.
| |
MouseWheelChange |
Mouse wheel change sign (eg 0, 1 or -1) since last frame.
|
Name | Description | |
---|---|---|
AnyMouseButtonClicked |
Return if any of mouse buttons was clicked this frame.
| |
AnyMouseButtonDown |
Return if any of mouse buttons is down.
| |
AnyMouseButtonPressed |
Return if any mouse button was pressed in current frame.
| |
AnyMouseButtonReleased |
Return if any mouse button was released this frame.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetTextInput |
Get textual input from keyboard.
If user enter keys it will push them into string, if delete or backspace will remove chars, etc.
This also handles keyboard cooldown, to make it feel like windows-input.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IsKeyDown |
Check if a given keyboard key is down.
| |
IsKeyReleased |
Check if a given keyboard key was previously pressed down and now released in this frame.
| |
MouseButtonClick |
Check if a given mouse button was just clicked (eg released after being pressed down)
| |
MouseButtonDown |
Check if a given mouse button is down.
| |
MouseButtonPressed |
Check if a given mouse button was pressed in current frame.
| |
MouseButtonReleased |
Check if a given mouse button was released in current frame.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
TransformMousePosition |
Calculate and return current cursor position transformed by a matrix.
| |
Update |
Update current states.
If used outside GeonBit.UI, this function should be called first thing inside your game 'Update()' function,
and before you make any use of this class.
| |
UpdateMousePosition |
Move the cursor to be at the center of the screen.
|
Name | Description | |
---|---|---|
KeysTypeCooldown | An artificial "lag" after a key is pressed when typing text input, to prevent mistake duplications. |