My first code was the same:

cegui->GetWindowManagerPtr()->getWindow("Demo7/Window1/Quit")->subscribeEvent(CEGUI::PushButton::EventClicked,
                CEGUI::Event::Subscriber(&CEGUITest::CEGUIExit,this));


But not working for me . I use WinXP SP2 + VC8 Express+ CEGUI 0.4.1.

My CEGUI code:


  cegui = CS_QUERY_REGISTRY(GetObjectRegistry(), iCEGUI);
  if (!cegui) return ReportError("Failed to locate CEGUI plugin");

  // Initialize CEGUI wrapper
  cegui->Initialize ();

  // Set the logging level
  cegui->GetLoggerPtr ()->setLoggingLevel(CEGUI::Informative);

  vfs->ChDir ("/ceguitest/");

  // Load the ice skin (which uses Falagard skinning system)
  cegui->GetSchemeManagerPtr ()->loadScheme("ice.scheme");

  cegui->GetSystemPtr ()->setDefaultMouseCursor("ice", "MouseArrow");
  cegui->GetFontManagerPtr ()->createFont("Vera", "/fonts/ttf/Vera.ttf", 10,
    CEGUI::Default);
  CEGUI::WindowManager* winMgr = cegui->GetWindowManagerPtr ();

  // Load layout and set as root
  cegui->GetSystemPtr ()->setGUISheet(winMgr->loadWindowLayout("ice.layout"));

 //Benyomjuk a CEGUIExit függvényt cegui->GetWindowManagerPtr()->getWindow("Demo7/Window1/Quit")->subscribeEvent(
CEGUI::PushButton::EventClicked,CEGUI::Event::Subscriber(&CEGUITest::CEGUIExit,this));

Based on the manual and your replies, I think, the code is ok. Or not?

Joco


Reply via email to