Click or drag to resize
DefaultInputProvider Class
Implement Mouse Input and Keyboard Input for GeonBit.UI + provide some helpful utils you can use externally. This is the object we provide to GeonBit.UI by default, if no other input providers were set by user.
Inheritance Hierarchy
SystemObject
  GeonBit.UIDefaultInputProvider

Namespace:  GeonBit.UI
Assembly:  GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class DefaultInputProvider : IMouseInput, 
	IKeyboardInput

The DefaultInputProvider type exposes the following members.

Constructors
  NameDescription
Public methodDefaultInputProvider
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.
Public propertyMouseWheel
Current mouse wheel value.
Public propertyMouseWheelChange
Mouse wheel change sign (eg 0, 1 or -1) since last frame.
Top
Methods
  NameDescription
Public methodAnyMouseButtonClicked
Return if any of mouse buttons was clicked this frame.
Public methodAnyMouseButtonDown
Return if any of mouse buttons is down.
Public methodAnyMouseButtonPressed
Return if any mouse button was pressed in current frame.
Public methodAnyMouseButtonReleased
Return if any mouse button was released this frame.
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 methodTransformMousePosition
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 methodUpdateMousePosition
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.
Top
See Also