Exemplo n.º 1
0
        private static void UpdateSuggestions()
        {
            if (_typedInputBuffer.Contains(' ') || _typedInputBuffer == "")
            {
                _suggestions.Clear();
                _currentSuggestion = 0;
                return;
            }

            if (_typedInputBuffer != _suggestionSource)
            {
                var suggestions = from command in ConVar.GetConVars()
                                  where command.Name.ToLower().StartsWith(_typedInputBuffer.ToLower()) && command.Name.ToLower() != _typedInputBuffer.ToLower()
                                  select command.Name;

                _suggestions       = suggestions.ToList();
                _currentSuggestion = -1;
            }
        }