Changeset 6870 for code/branches/chat2/src/orxonox/ChatInputHandler.cc
- Timestamp:
- May 10, 2010, 1:47:44 PM (14 years ago)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.