[Orxonox-commit 2568] r7273 - code/branches/consolecommands3/src/libraries/core/input

landauf at orxonox.net landauf at orxonox.net
Mon Aug 30 22:28:09 CEST 2010


Author: landauf
Date: 2010-08-30 22:28:08 +0200 (Mon, 30 Aug 2010)
New Revision: 7273

Modified:
   code/branches/consolecommands3/src/libraries/core/input/KeyBinderManager.cc
   code/branches/consolecommands3/src/libraries/core/input/KeyDetector.cc
Log:
"KeyDetectorKeyPressed" is now a hidden command and "keybind" and "tkeybind" support auto-completion for the bound command

Modified: code/branches/consolecommands3/src/libraries/core/input/KeyBinderManager.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/core/input/KeyBinderManager.cc	2010-08-30 20:09:08 UTC (rev 7272)
+++ code/branches/consolecommands3/src/libraries/core/input/KeyBinderManager.cc	2010-08-30 20:28:08 UTC (rev 7273)
@@ -47,8 +47,8 @@
     static const std::string __CC_unbind_name = "unbind";
     static const std::string __CC_tunbind_name = "tunbind";
 
-    SetConsoleCommand(__CC_keybind_name,  &KeyBinderManager::keybind).defaultValues("");
-    SetConsoleCommand(__CC_tkeybind_name, &KeyBinderManager::tkeybind).defaultValues("");
+    SetConsoleCommand(__CC_keybind_name,  &KeyBinderManager::keybind).defaultValues("").argumentCompleter(0, autocompletion::command());
+    SetConsoleCommand(__CC_tkeybind_name, &KeyBinderManager::tkeybind).defaultValues("").argumentCompleter(0, autocompletion::command());
     SetConsoleCommand(__CC_unbind_name,   &KeyBinderManager::unbind).defaultValues("");
     SetConsoleCommand(__CC_tunbind_name,  &KeyBinderManager::tunbind).defaultValues("");
 

Modified: code/branches/consolecommands3/src/libraries/core/input/KeyDetector.cc
===================================================================
--- code/branches/consolecommands3/src/libraries/core/input/KeyDetector.cc	2010-08-30 20:09:08 UTC (rev 7272)
+++ code/branches/consolecommands3/src/libraries/core/input/KeyDetector.cc	2010-08-30 20:28:08 UTC (rev 7273)
@@ -40,7 +40,7 @@
     ManageScopedSingleton(KeyDetector, ScopeID::Graphics, false);
 
     static const std::string __CC_KeyDetector_callback_name = "KeyDetectorKeyPressed";
-    DeclareConsoleCommand(__CC_KeyDetector_callback_name, &prototype::void__string);
+    DeclareConsoleCommand(__CC_KeyDetector_callback_name, &prototype::void__string).hide();
 
     KeyDetector::KeyDetector()
         : KeyBinder("")




More information about the Orxonox-commit mailing list