Changeset 6870 for code/branches/chat2/src
- Timestamp:
- May 10, 2010, 1:47:44 PM (15 years ago)
- Location:
- code/branches/chat2/src/orxonox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/chat2/src/orxonox/ChatInputHandler.cc
r6846 r6870 46 46 SetConsoleCommandAlias( ChatInputHandler, activate_static, "startchat", 47 47 true ); 48 SetConsoleCommandAlias( ChatInputHandler, activate_small_static, 49 "startchat_small", true ); 48 50 49 51 … … 58 60 assert( this->inpbuf != NULL ); 59 61 60 /* MARK add generation of ChatBox thingy here*/62 /* generate chatbox ui and chatbox-inputonly ui */ 61 63 GUIManager::getInstance().loadGUI( "ChatBox" ); 64 GUIManager::getInstance().loadGUI( "ChatBox-inputonly" ); 62 65 63 66 /* configure the input buffer */ … … 66 69 this->inputState = InputManager::getInstance().createInputState( "chatinput", false, false, InputStatePriority::Dynamic ); 67 70 this->inputState->setKeyHandler(this->inpbuf); 68 69 //[> set console shortcut <]70 //this->getIdentifier()->addConsoleCommand(createConsoleCommand(createFunctor(71 //&ChatInputHandler::activate, this), "startchat"), false);72 71 } 73 72 … … 99 98 /* get window pointers */ 100 99 input = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox/input" ); 100 inputonly = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox-inputonly/input" ); 101 101 102 CEGUI::Window *history = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox/history" ); 102 103 lb_history = dynamic_cast<CEGUI::Listbox*>(history); … … 109 110 /* activate, deactivate */ 110 111 void ChatInputHandler::activate_static() 111 { ChatInputHandler::getInstance().activate(); } 112 113 void ChatInputHandler::activate() 112 { ChatInputHandler::getInstance().activate( true ); } 113 114 void ChatInputHandler::activate_small_static() 115 { ChatInputHandler::getInstance().activate( false ); } 116 117 void ChatInputHandler::activate( bool full ) 114 118 { 115 119 /* start listening */ … … 118 122 119 123 /* MARK add spawning of chat widget stuff here.*/ 120 GUIManager::getInstance().showGUI( "ChatBox" ); 124 if( full ) 125 GUIManager::getInstance().showGUI( "ChatBox" ); 126 else 127 GUIManager::getInstance().showGUI( "ChatBox-inputonly" ); 121 128 } 122 129 … … 128 135 /* MARK add un-spawning of chat widget stuff here. */ 129 136 GUIManager::getInstance().hideGUI( "ChatBox" ); 137 GUIManager::getInstance().hideGUI( "ChatBox-inputonly" ); 130 138 } 131 139 … … 146 154 /* set the text */ 147 155 this->input->setProperty( "Text", left + "|" + right ); 156 this->inputonly->setProperty( "Text", left + "|" + right ); 148 157 } 149 158 -
code/branches/chat2/src/orxonox/ChatInputHandler.h
r6846 r6870 73 73 74 74 /* cegui stuff */ 75 CEGUI::Window *input ;75 CEGUI::Window *input, *inputonly; 76 76 CEGUI::Listbox *lb_history; 77 77 … … 83 83 /* start listening, stop listening */ 84 84 static void activate_static(); 85 void activate(); 85 static void activate_small_static(); 86 void activate( bool full ); 86 87 void deactivate(); 87 88
Note: See TracChangeset
for help on using the changeset viewer.