Class Input
Static input monitor class
Inheritance
System.Object
Input
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Ladybug.UserInput
Assembly: ladybug.dll
Syntax
public static class Input
Fields
| Improve this Doc View SourceDEFAULT_GAMEPAD_COUNT
Default number of GamePads
Declaration
public const int DEFAULT_GAMEPAD_COUNT = 4
Field Value
Type | Description |
---|---|
System.Int32 |
Keyboard
Global KeyboardMonitor
Declaration
public static readonly KeyboardMonitor Keyboard
Field Value
Type | Description |
---|---|
KeyboardMonitor |
Mouse
Global MouseMonitor
Declaration
public static readonly MouseMonitor Mouse
Field Value
Type | Description |
---|---|
MouseMonitor |
Properties
| Improve this Doc View SourceGamePads
Global list of GamePadMonitors
Declaration
public static GamePadMonitor[] GamePads { get; }
Property Value
Type | Description |
---|---|
GamePadMonitor[] |
Methods
| Improve this Doc View SourceClearAction(String)
Removes keys and buttons bound to the given action
Declaration
public static void ClearAction(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
ClearAllActions()
Removes all defined actions
Declaration
public static void ClearAllActions()
SetAction(String, Buttons[])
Creates or sets a new input action bound to one or more buttons
Declaration
public static void SetAction(string name, params Buttons[] buttons)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the action |
Microsoft.Xna.Framework.Input.Buttons[] | buttons | Buttons bound to the action |
SetAction(String, Keys[])
Creates or sets a new input action bound to one or more keys
Declaration
public static void SetAction(string name, params Keys[] keys)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Name of the action |
Microsoft.Xna.Framework.Input.Keys[] | keys | Keys bound to the action |
SetGamepadCount(Int32)
Sets the available number of GamePads
Declaration
public static void SetGamepadCount(int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | count |
Events
| Improve this Doc View SourceAction
A registered input action has been detected
Declaration
public static event EventHandler<InputActionEventArgs> Action
Event Type
Type | Description |
---|---|
System.EventHandler<InputActionEventArgs> |