private int NextNonWhitespaceIndex() { int index = _progress; while (TGK_Input.IsWhitespace(RequiredInputByIndex(index)) && index < _text.Length) { index += 1; } return(index); }
/// <summary> /// Returns true if the sequence would accept the given input. /// </summary> public bool DoesAcceptInput(string input) { foreach (var requiredInput in AcceptableInputs) { if (TGK_Input.AreInputEqual(input, requiredInput, _isCaseSensitive)) { return(true); } } return(false); }
/// <summary> /// Adds input from the specified key. /// </summary> public void HandleKeyPress(VirtualKeyboardKey key) { OnKeyPressed(key); TGK_Input.AddInput(key.Input); SetLayer(key.NextLayer); }
private bool DoesMatchAtIndex(string input, int investigatedIndex) { return(TGK_Input.AreInputEqual(RequiredInputByIndex(investigatedIndex), input, _isCaseSensitive)); }