There's a new command (UpdateAutoComplete) that the UI calls when the command is changed or when the cursor moves (currently does it every frame). Then the UpdateAutoComplete command calls CommandParser::completion which then makes the current command parser return a list of CompletionSuggestions, which is then displayed to user.
Changelog
Added autocompletions
The CommandParser trait has a new optional method: completion, every time the UI calls this method every time the command changes or the cursor changes.
The Builtin-parser now implements the new optional CommandParser method.
Added CompletionSuggestion, which represents a completion suggestion.
Objective
Fixes #26
Solution
There's a new command (
UpdateAutoComplete
) that the UI calls when the command is changed or when the cursor moves (currently does it every frame). Then theUpdateAutoComplete
command callsCommandParser::completion
which then makes the current command parser return a list ofCompletionSuggestion
s, which is then displayed to user.Changelog
CommandParser
trait has a new optional method:completion
, every time the UI calls this method every time the command changes or the cursor changes.CommandParser
method.CompletionSuggestion
, which represents a completion suggestion.