C# Class Protogame.DefaultKeyboardStringReader

The default keyboard string reader.
Inheritance: IKeyboardStringReader
Afficher le fichier Open project: RedpointGames/Protogame

Méthodes publiques

Méthode Description
DefaultKeyboardStringReader ( ) : System

Initializes a new instance of the DefaultKeyboardStringReader class. Initializes a new instance of the KeyboardStringBuilder class.

Process ( KeyboardState keyboard, GameTime time, StringBuilder text ) : void

Process the current keyboard state and add or remove characters from the given StringBuilder.

Private Methods

Méthode Description
GetCharacter ( Microsoft.Xna.Framework.Input.Keys key, bool shift, bool capsLock, bool numLock ) : char?

Gets the character associated with the given key/shift pair.

ProcessKey ( Microsoft.Xna.Framework.Input.Keys key, bool shift, bool capsLock, bool numLock, StringBuilder text ) : void

Modifies the StringBuilder based on the pressed key.

Method Details

DefaultKeyboardStringReader() public méthode

Initializes a new instance of the DefaultKeyboardStringReader class. Initializes a new instance of the KeyboardStringBuilder class.
public DefaultKeyboardStringReader ( ) : System
Résultat System

Process() public méthode

Process the current keyboard state and add or remove characters from the given StringBuilder.
public Process ( KeyboardState keyboard, GameTime time, StringBuilder text ) : void
keyboard Microsoft.Xna.Framework.Input.KeyboardState /// The keyboard state input is being read from. ///
time Microsoft.Xna.Framework.GameTime /// Current GameTime. ///
text StringBuilder /// The StringBuilder to be modified based on keyboard state. ///
Résultat void