Namespace: DeltaEngine.Input
Assembly: DeltaEngine.Input (in DeltaEngine.Input.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Input.Tests.KeyboardTests
2 unit tests call DeltaEngine.Input.Keyboard.HandleInput(System.String)
Assembly: DeltaEngine.Input (in DeltaEngine.Input.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Parameters
- inputText
- Type: System String
Return Value
Type: StringRemarks
Examples
[Test, CloseAfterFirstFrame] public void HandleInput() { if (mockKeyboard == null) return; //ncrunch: no coverage Assert.AreEqual("", keyboard.HandleInput("")); mockKeyboard.SetKeyboardState(Key.A, State.Pressing); mockKeyboard.SetKeyboardState(Key.Z, State.Pressing); Assert.AreEqual("az", keyboard.HandleInput("")); mockKeyboard.SetKeyboardState(Key.A, State.Pressing); mockKeyboard.SetKeyboardState(Key.Backspace, State.Pressing); Assert.AreEqual("", keyboard.HandleInput("")); mockKeyboard.SetKeyboardState(Key.Escape, State.Pressing); Assert.AreEqual("", keyboard.HandleInput("")); mockKeyboard.SetKeyboardState(Key.Space, State.Pressing); mockKeyboard.SetKeyboardState(Key.D9, State.Pressing); Assert.AreEqual(" 9", keyboard.HandleInput("")); }
[Test] public void HandleInputVisually() { var text = new FontText(Font.Default, "Type some text", Rectangle.One); text.Start<ContinousInputHandler>(); }
See Also