[Orxonox-commit 2075] r6791 - in code/branches/chat: data/defaultConfig src/orxonox

smerkli at orxonox.net smerkli at orxonox.net
Mon Apr 26 16:35:31 CEST 2010


Author: smerkli
Date: 2010-04-26 16:35:31 +0200 (Mon, 26 Apr 2010)
New Revision: 6791

Modified:
   code/branches/chat/data/defaultConfig/keybindings.ini
   code/branches/chat/src/orxonox/ChatInputHandler.cc
   code/branches/chat/src/orxonox/ChatInputHandler.h
Log:
Chat works lowlevel, shortcut is set to B. needs ui now.

Modified: code/branches/chat/data/defaultConfig/keybindings.ini
===================================================================
--- code/branches/chat/data/defaultConfig/keybindings.ini	2010-04-26 14:27:04 UTC (rev 6790)
+++ code/branches/chat/data/defaultConfig/keybindings.ini	2010-04-26 14:35:31 UTC (rev 6791)
@@ -6,7 +6,7 @@
 KeyAX=
 KeyApostrophe=
 KeyApps=
-KeyB=
+KeyB =
 KeyBack=
 KeyBackslash=
 KeyC=switchCamera

Modified: code/branches/chat/src/orxonox/ChatInputHandler.cc
===================================================================
--- code/branches/chat/src/orxonox/ChatInputHandler.cc	2010-04-26 14:27:04 UTC (rev 6790)
+++ code/branches/chat/src/orxonox/ChatInputHandler.cc	2010-04-26 14:35:31 UTC (rev 6791)
@@ -36,6 +36,8 @@
 {
   /* singleton */
   ManageScopedSingleton( ChatInputHandler, ScopeID::Graphics, false );
+  SetConsoleCommandAlias( ChatInputHandler, activate_static, "startchat",
+    true );
 
   /* constructor */
   ChatInputHandler::ChatInputHandler()
@@ -49,14 +51,14 @@
     this->inpbuf = new InputBuffer();
 
     /* configure the input buffer */
-		configureInputBuffer();
+    configureInputBuffer();
 
     this->inputState = InputManager::getInstance().createInputState( "chatinput", false, false, InputStatePriority::Dynamic );
     this->inputState->setKeyHandler(this->inpbuf);
 
-    /* set console shortcut */
-    this->getIdentifier()->addConsoleCommand(createConsoleCommand(createFunctor(
-      &ChatInputHandler::activate, this), "startchat"), false);
+    //[> set console shortcut <]
+    //this->getIdentifier()->addConsoleCommand(createConsoleCommand(createFunctor(
+      //&ChatInputHandler::activate, this), "startchat"), false);
   }
 
   void ChatInputHandler::configureInputBuffer()
@@ -87,6 +89,9 @@
 
 
   /* activate, deactivate */
+  void ChatInputHandler::activate_static()
+  { ChatInputHandler::getInstance().activate(); }
+  
   void ChatInputHandler::activate()
   {
     /* start listening */

Modified: code/branches/chat/src/orxonox/ChatInputHandler.h
===================================================================
--- code/branches/chat/src/orxonox/ChatInputHandler.h	2010-04-26 14:27:04 UTC (rev 6790)
+++ code/branches/chat/src/orxonox/ChatInputHandler.h	2010-04-26 14:35:31 UTC (rev 6791)
@@ -38,15 +38,14 @@
 
 /* project includes */
 #include <OrxonoxPrereqs.h>
+#include <core/BaseObject.h>
+#include <core/PathConfig.h>
+
 #include "core/input/InputBuffer.h"
 #include "core/input/InputManager.h"
 #include "core/input/InputState.h"
+
 #include "../libraries/network/Host.h"
-#include <core/BaseObject.h>
-#include <PlayerManager.h>
-#include <infos/PlayerInfo.h>
-#include <network/ChatListener.h>
-#include <core/PathConfig.h>
 #include <util/Singleton.h>
 
 
@@ -77,6 +76,7 @@
       friend class Singleton<ChatInputHandler>;
 
       /* start listening, stop listening */
+      static void activate_static();
       void activate();
       void deactivate();
 




More information about the Orxonox-commit mailing list