Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 2 and Version 3 of code/doc/ConsoleCommand


Ignore:
Timestamp:
Oct 1, 2008, 12:39:35 AM (16 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/ConsoleCommand

    v2 v3  
    3030};
    3131}}}
     32
     33'''Important''': This works only for static memberfunctions of a class inheriting from [wiki:OrxonoxClass]. For any other combination see [wiki:ConsoleCommand#AdvancedCreation the chapter below].
    3234
    3335=== Call ===
     
    7678Note: The attributes can be specified in any order.
    7779
     80=== Advanced Creation ===
     81There are several different macros so create a !ConsoleCommand:
     82
     83 * Static classfunction, class derived from [wiki:OrxonoxClass]
     84  * '''SetConsoleCommand('''''classname, function, bCreateShortcut''''')''':
     85   * Simple command, with or without shortcut
     86  * '''SetConsoleCommandAlias('''''classname, function, name, bCreateShortcut''''')''':
     87   * Command with a different name than the functionname, with or without shortcut
     88  * '''SetConsoleCommandAliasMulti('''''classname, function, name, number, bCreateShortcut''''')''':
     89   * Several commands with different names calling the same function, number must be different for each command, with or without shortcut[[br]][[br]]
     90  * '''SetConsoleCommandGeneric('''''fakevariable, classname, command, bCreateShortcut''''')''':
     91   * Custom command, you have to create !ConsoleCommand manually with new, fakevariable must be a unique name
     92
     93 * Static classfunction, class '''not''' derived from [wiki:OrxonoxClass]
     94  * '''SetConsoleCommandShortcut('''''classname, function''''')''':
     95   * Simple command, only a shortcut
     96  * '''SetConsoleCommandShortcutAlias('''''classname, function, name''''')''':
     97   * Shortcut with a different name than the functionname
     98  * '''SetConsoleCommandShortcutAliasMulti('''''classname, function, name, number''''')''':
     99   * Several shortcuts with different names calling the same function, number must be different for each command
     100
     101 * C-style function
     102  * '''SetConsoleCommandShortcutExtern('''''function''''')''':
     103   * Simple command, only a shortcut
     104  * '''SetConsoleCommandShortcutExternAlias('''''function, name''''')''':
     105   * Shortcut with a different name than the functionname
     106  * '''SetConsoleCommandShortcutExternAliasMulti('''''function, name, number''''')''':
     107   * Several shortcuts with different names calling the same function, number must be different for each command[[br]][[br]]
     108  * '''SetConsoleCommandShortcutGeneric('''''fakevariable, command''''')''':
     109   * Custom command, you have to create !ConsoleCommand manually with new, fakevariable must be a unique name
     110
    78111== Access Levels ==
    79112-to come-