GetStringTyped
Introduction
Code Example
using FlatRedBall.Input;
using FlatRedBall.Graphics; // for Text
using Microsoft.Xna.Framework.Input; // for the Keys enumText text;protected override void Initialize()
{
base.Initialize();
FlatRedBallServices.InitializeFlatRedBall(this, this.graphics);
text = TextManager.AddText("Text:");
}
// Replace Update with the following:
protected override void Update(GameTime gameTime)
{
FlatRedBallServices.Update(gameTime);
text.DisplayText += InputManager.Keyboard.GetStringTyped();
if (InputManager.Keyboard.KeyPushed(Keys.Enter))
text.DisplayText = "";
base.Update(gameTime);
}
Copy/Paste
Last updated
Was this helpful?