InputHelper Class

GeonBit.UI

InputHelper Class
Provide easier keyboard and mouse access, keyboard text input, and other user input utils.
Inheritance Hierarchy
SystemObject  GeonBit.UIInputHelper

Namespace:  GeonBit.UI
Assembly:  GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class InputHelper

The InputHelper type exposes the following members.

Constructors
  NameDescription
Public methodInputHelper
Create the input helper.
Top
Properties
  NameDescription
Public propertyCurrGameTime
Current frame game time.
Public propertyMousePosition
Get current mouse poisition.
Public propertyMousePositionDiff
Get mouse position change since last frame.
Top
Methods
  NameDescription
Public methodAnyMouseButtonDown
Return if any of mouse buttons is down.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetTextInput
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.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsKeyDown
Check if a given keyboard key is down.
Public methodIsKeyReleased
Check if a given keyboard key was previously pressed down and now released in this frame.
Public methodMouseButtonClick
Check if a given mouse button was just clicked (eg released after being pressed down)
Public methodMouseButtonDown
Check if a given mouse button is down.
Public methodMouseButtonPressed
Check if a given mouse button was pressed in current frame.
Public methodMouseButtonReleased
Check if a given mouse button was released in current frame.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTransformCursorPos
Calculate and return current cursor position transformed by a matrix.
Public methodUpdate
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.
Public methodUpdateCursorPosition
Move the cursor to be at the center of the screen.
Top
Fields
  NameDescription
Public fieldKeysTypeCooldown
An artificial "lag" after a key is pressed when typing text input, to prevent mistake duplications.
Public fieldMouseWheel
Current mouse wheel value.
Public fieldMouseWheelChange
Mouse wheel change sign (eg 0, 1 or -1) since last frame.
Top
See Also