C# Class SadConsole.Input.AsciiKey

Represents the state of a single key.
Afficher le fichier Open project: Thraka/SadConsole Class Usage Examples

Méthodes publiques

Свойство Type Description
Character char
PreviouslyPressed bool
TimeHeld float
XnaKey Keys

Méthodes publiques

Méthode Description
Equals ( object obj ) : bool

Compares references.

Fill ( Keys key, bool shiftPressed ) : void

Fills out the fields based on the MonoGame/XNA key.

Get ( Keys key ) : AsciiKey

Shortcut to get the AsciiKey for a specific MonoGame/XNA Keys type. Shift is considered not pressed.

Get ( Keys key, bool shiftPressed ) : AsciiKey

Shortcut to get the AsciiKey for a specific MonoGame/XNA Keys type.

operator ( ) : bool

Compares if the Character field of two AsciiKey instances are the same.

Method Details

Equals() public méthode

Compares references.
public Equals ( object obj ) : bool
obj object
Résultat bool

Fill() public méthode

Fills out the fields based on the MonoGame/XNA key.
public Fill ( Keys key, bool shiftPressed ) : void
key Keys The key.
shiftPressed bool Helps identify which to use while the key is pressed. For example, if is used the field will be either 'A' if is true or 'a' if false.
Résultat void

Get() public static méthode

Shortcut to get the AsciiKey for a specific MonoGame/XNA Keys type. Shift is considered not pressed.
public static Get ( Keys key ) : AsciiKey
key Keys The key.
Résultat AsciiKey

Get() public static méthode

Shortcut to get the AsciiKey for a specific MonoGame/XNA Keys type.
public static Get ( Keys key, bool shiftPressed ) : AsciiKey
key Keys The key.
shiftPressed bool If shift should be considered pressed or not.
Résultat AsciiKey

operator() public static méthode

Compares if the Character field of two AsciiKey instances are the same.
public static operator ( ) : bool
Résultat bool

Property Details

Character public_oe property

The keyboard character of the key.
public char Character
Résultat char

PreviouslyPressed public_oe property

Tracks if the key was previously held when calcualting the KeyboardInfo.InitialRepeatDelay.
public bool PreviouslyPressed
Résultat bool

TimeHeld public_oe property

Total time the key has been held.
public float TimeHeld
Résultat float

XnaKey public_oe property

The key from MonoGame or XNA.
public Keys XnaKey
Résultat Keys