20,741
edits
Line 214: | Line 214: | ||
In addition to directly editing the default initialization routine in fg_init.cxx, you can also dynamically add/remove fgcommands from your SGSubsystem, by getting a handle to the SGCommandMgr singleton, specifying a command name, and a corresponding callback (which can be a static member of your SGSubsystem): | In addition to directly editing the default initialization routine in fg_init.cxx, you can also dynamically add/remove fgcommands from your SGSubsystem, by getting a handle to the SGCommandMgr singleton, specifying a command name, and a corresponding callback (which can be a static member of your SGSubsystem): | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
#include <simgear/structure/commands.hxx> | #include <simgear/structure/commands.hxx> | ||
... | ... |