C# Class Protogame.DefaultKeyboardStringReader

The default keyboard string reader.
Inheritance: IKeyboardStringReader
显示文件 Open project: RedpointGames/Protogame

Public Methods

Method 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

Method 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 method

Initializes a new instance of the DefaultKeyboardStringReader class. Initializes a new instance of the KeyboardStringBuilder class.
public DefaultKeyboardStringReader ( ) : System
return System

Process() public method

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. ///
return void