[Orxonox-commit 3344] r8032 - in code/branches/usability: data/defaultConfig data/gui/scripts src/libraries/core src/libraries/network src/orxonox/overlays

landauf at orxonox.net landauf at orxonox.net
Sun Mar 6 14:23:39 CET 2011


Author: landauf
Date: 2011-03-06 14:23:39 +0100 (Sun, 06 Mar 2011)
New Revision: 8032

Modified:
   code/branches/usability/data/defaultConfig/keybindings.ini
   code/branches/usability/data/gui/scripts/KeyBindMenu.lua
   code/branches/usability/data/gui/scripts/SheetManager.lua
   code/branches/usability/src/libraries/core/Game.cc
   code/branches/usability/src/libraries/network/Host.cc
   code/branches/usability/src/orxonox/overlays/InGameConsole.cc
Log:
 - removed console command shortcuts for InGameConsole openConsole and closeConsole - hope I adjusted all references to this command correctly
 - moved printFPS, printTickTime, and printRTT to "Stats" console command group (couldn't find any references to this, so hopefully nothing is broken)

Modified: code/branches/usability/data/defaultConfig/keybindings.ini
===================================================================
--- code/branches/usability/data/defaultConfig/keybindings.ini	2011-03-06 13:02:18 UTC (rev 8031)
+++ code/branches/usability/data/defaultConfig/keybindings.ini	2011-03-06 13:23:39 UTC (rev 8032)
@@ -41,7 +41,7 @@
 KeyF8=
 KeyF9=
 KeyG=greet
-KeyGrave="openConsole"
+KeyGrave="InGameConsole openConsole"
 KeyH=
 KeyHome=
 KeyI=
@@ -126,7 +126,7 @@
 KeyTab="NewHumanController changeMode"
 KeyU=""
 KeyUP="scale 1 moveFrontBack"
-KeyUnassigned="openConsole"
+KeyUnassigned="InGameConsole openConsole"
 KeyUnderline=
 KeyUnlabeled=
 KeyV=

Modified: code/branches/usability/data/gui/scripts/KeyBindMenu.lua
===================================================================
--- code/branches/usability/data/gui/scripts/KeyBindMenu.lua	2011-03-06 13:02:18 UTC (rev 8031)
+++ code/branches/usability/data/gui/scripts/KeyBindMenu.lua	2011-03-06 13:23:39 UTC (rev 8032)
@@ -25,7 +25,7 @@
     table.insert(commandList, "scale -1 rotatePitch")
     table.insert(commandList, "NewHumanController changeMode")
     table.insert(commandList, "switchCamera")
-    table.insert(commandList, "openConsole")
+    table.insert(commandList, "InGameConsole openConsole")
     table.insert(commandList, "OverlayGroup toggleVisibility Debug")
     table.insert(commandList, "OverlayGroup toggleVisibility Stats")
     table.insert(commandList, "OrxonoxOverlay toggleVisibility QuestGUI")

Modified: code/branches/usability/data/gui/scripts/SheetManager.lua
===================================================================
--- code/branches/usability/data/gui/scripts/SheetManager.lua	2011-03-06 13:02:18 UTC (rev 8031)
+++ code/branches/usability/data/gui/scripts/SheetManager.lua	2011-03-06 13:23:39 UTC (rev 8032)
@@ -244,7 +244,7 @@
         if code == "1" then
             keyESC()
         elseif code == "0"then
-            orxonox.CommandExecutor:execute("openConsole")
+            orxonox.CommandExecutor:execute("InGameConsole openConsole")
         end
     end
     sheet.sheet:keyPressed()

Modified: code/branches/usability/src/libraries/core/Game.cc
===================================================================
--- code/branches/usability/src/libraries/core/Game.cc	2011-03-06 13:02:18 UTC (rev 8031)
+++ code/branches/usability/src/libraries/core/Game.cc	2011-03-06 13:23:39 UTC (rev 8032)
@@ -60,10 +60,10 @@
     SetConsoleCommand("exit", &stop_game);
     static void printFPS()
         { COUT(0) << Game::getInstance().getAvgFPS() << std::endl; }
-    SetConsoleCommand("printFPS", &printFPS);
+    SetConsoleCommand("Stats", "printFPS", &printFPS);
     static void printTickTime()
         { COUT(0) << Game::getInstance().getAvgTickTime() << std::endl; }
-    SetConsoleCommand("printTickTime", &printTickTime);
+    SetConsoleCommand("Stats", "printTickTime", &printTickTime);
 
     std::map<std::string, GameStateInfo> Game::gameStateDeclarations_s;
     Game* Game::singletonPtr_s = 0;

Modified: code/branches/usability/src/libraries/network/Host.cc
===================================================================
--- code/branches/usability/src/libraries/network/Host.cc	2011-03-06 13:02:18 UTC (rev 8031)
+++ code/branches/usability/src/libraries/network/Host.cc	2011-03-06 13:23:39 UTC (rev 8032)
@@ -37,10 +37,11 @@
 
 namespace orxonox {
 
+  static const std::string __CC_printRTT_group = "Stats";
   static const std::string __CC_printRTT_name = "printRTT";
 
   SetConsoleCommand("chat", &Host::Chat);
-  SetConsoleCommand(__CC_printRTT_name, &Host::printRTT);
+  SetConsoleCommand(__CC_printRTT_group, __CC_printRTT_name, &Host::printRTT);
 
   // Host*               Host::instance_=0;
   uint32_t            Host::clientID_s=0;
@@ -54,7 +55,7 @@
   {
   //   assert(instance_==0);
     instances_s.push_back(this);
-    ModifyConsoleCommand(__CC_printRTT_name).setObject(this);
+    ModifyConsoleCommand(__CC_printRTT_group, __CC_printRTT_name).setObject(this);
     this->bIsActive_ = false;
   }
 
@@ -66,7 +67,7 @@
   {
     assert( std::find( instances_s.begin(), instances_s.end(), this )!=instances_s.end() );
     instances_s.erase(std::find( instances_s.begin(), instances_s.end(), this ));
-    ModifyConsoleCommand(__CC_printRTT_name).setObject(0);
+    ModifyConsoleCommand(__CC_printRTT_group, __CC_printRTT_name).setObject(0);
   }
 
   /**

Modified: code/branches/usability/src/orxonox/overlays/InGameConsole.cc
===================================================================
--- code/branches/usability/src/orxonox/overlays/InGameConsole.cc	2011-03-06 13:02:18 UTC (rev 8031)
+++ code/branches/usability/src/orxonox/overlays/InGameConsole.cc	2011-03-06 13:23:39 UTC (rev 8032)
@@ -59,8 +59,8 @@
     const int LINES = 30;
     const float CHAR_WIDTH = 7.45f; // fix this please - determine the char-width dynamically
 
-    SetConsoleCommand("InGameConsole", "openConsole", &InGameConsole::openConsole).addShortcut();
-    SetConsoleCommand("InGameConsole", "closeConsole", &InGameConsole::closeConsole).addShortcut();
+    SetConsoleCommand("InGameConsole", "openConsole", &InGameConsole::openConsole);
+    SetConsoleCommand("InGameConsole", "closeConsole", &InGameConsole::closeConsole);
 
     ManageScopedSingleton(InGameConsole, ScopeID::Graphics, false);
 




More information about the Orxonox-commit mailing list