Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 21, 2018, 12:03:52 AM (6 years ago)
Author:
landauf
Message:

merged ogre1.9 (including cegui0.8) into new branch

Location:
code/branches/cegui0.8_ogre1.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cegui0.8_ogre1.9

  • code/branches/cegui0.8_ogre1.9/src/orxonox/chat/ChatInputHandler.cc

    r11083 r11795  
    131131    /* GET WINDOW POINTERS */
    132132#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" );
    136153#else
    137154    input = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox/input" );
    138155    inputonly = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox-inputonly/input" );
    139156    CEGUI::Window *history = CEGUI::WindowManager::getSingleton().getWindow( "orxonox/ChatBox/history" );
    140 #endif
    141157
    142158    /* cast it to a listbox */
    143159    lb_history = dynamic_cast<CEGUI::Listbox*>(history);
     160#endif
    144161
    145162    /* assert wee */
Note: See TracChangeset for help on using the changeset viewer.