Ok Just take the singleton etc on mouse click event and the cegui elemets are running:
if (mouse->GetLastButton(0))
{
using namespace CEGUI;
WindowManager::getSingleton().getWindow("Demo7/Window1/Quit")->
subscribeEvent(PushButton::EventClicked, Event::Subscriber(&TTViewer::HandleQuit, this));
}
Thx for helping people.
