- Timestamp:
- Feb 16, 2016, 10:10:43 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cegui0.8/src/orxonox/chat/ChatInputHandler.cc
r11083 r11118 131 131 /* GET WINDOW POINTERS */ 132 132 #if CEGUI_VERSION >= 0x000800 133 input = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "orxonox/ChatBox/input" ); 134 inputonly = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "orxonox/ChatBox-inputonly/input" ); 135 CEGUI::Window *history = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "orxonox/ChatBox/history" ); 133 //input = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "ChatBox/input" ); 134 //const CEGUI::Window* root = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild("MenuRootWindow"); 135 //std::cout << "Count: " << root->getChildCount() << std::endl; 136 //for (int i = 0; i < root->getChildCount(); ++i) { 137 // std::cout << "Child: " << root->getChildAtIdx(i)->getName() << std::endl; 138 //} 139 for (auto iterator = CEGUI::WindowManager::getSingleton().getIterator(); !iterator.isAtEnd(); iterator++) { 140 CEGUI::Window* currentWindow = iterator.getCurrentValue(); 141 if (currentWindow->getName().compare("ChatBox") == 0) { 142 input = currentWindow->getChild("frame")->getChild("input"); 143 CEGUI::Window* history = currentWindow->getChild("frame")->getChild("history"); 144 lb_history = dynamic_cast<CEGUI::Listbox*>(history); 145 } else if (currentWindow->getName().compare("ChatBox-inputonly") == 0) { 146 inputonly = currentWindow->getChild("input"); 147 } 148 } 149 150 //input = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "ChatBox" )->getChild("frame")->getChild("input"); 151 //inputonly = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "orxonox/ChatBox-inputonly/input" ); 152 //CEGUI::Window *history = CEGUI::System::getSingleton().getDefaultGUIContext().getRootWindow()->getChild( "orxonox/ChatBox/history" ); 136 153 #else 137 154 input = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox/input" ); 138 155 inputonly = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox-inputonly/input" ); 139 156 CEGUI::Window *history = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox/history" ); 140 #endif141 157 142 158 /* cast it to a listbox */ 143 159 lb_history = dynamic_cast<CEGUI::Listbox*>(history); 160 #endif 144 161 145 162 /* assert wee */
Note: See TracChangeset
for help on using the changeset viewer.