Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 28, 2010, 12:02:03 AM (15 years ago)
Author:
landauf
Message:
  • console commands "setMMSoundPath" and "printObjects" are now hidden.
  • added "unhide" command to show hidden commands
  • extended auto-completion capability by allowing multi-word ArgumentCompleter and more
  • added new auto-completion function that allows other commands as argument for a command (for example "delay [time] [command]")
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/consolecommands3/src/libraries/core/command/ArgumentCompletionFunctions.h

    r7228 r7233  
    3939
    4040#define ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION(functionname) \
     41    _ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_INTERNAL(functionname, false)
     42#define ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_MULTI(functionname) \
     43    _ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_INTERNAL(functionname, true)
     44
     45#define _ARGUMENT_COMPLETION_FUNCTION_IMPLEMENTATION_INTERNAL(functionname, bUseMultipleWords) \
    4146    ArgumentCompleter* functionname() \
    4247    { \
    43         static ArgumentCompleter completer = ArgumentCompleter(&acf_##functionname); \
     48        static ArgumentCompleter completer = ArgumentCompleter(&acf_##functionname, bUseMultipleWords); \
    4449        return &completer; \
    4550    } \
     
    5560        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(groupsandcommands)();
    5661        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(subcommands)(const std::string& fragment, const std::string& group);
     62        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(hiddengroupsandcommands)();
     63        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(hiddensubcommands)(const std::string& fragment, const std::string& group);
     64        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(command)(const std::string& fragment);
    5765        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(files)(const std::string& fragment);
    5866        ARGUMENT_COMPLETION_FUNCTION_DECLARATION(settingssections)();
Note: See TracChangeset for help on using the changeset viewer.