I am using VS2010 and cegui 0.7.2, I haven't had problems until now.
VS configuration is ok, include path, lib path and *_d.lib to use, also *_d.dll are on their place.
I have a problem visualizing this elements when they are created dynamically and in Debug mode. If I run the Release configuration everything is OK. If I load a window from a layout file, all is ok in Release and Debug mode. It only fails when I create the elements dynamically and use them in Debug configuration. The root window is a DefaultWindow, but if I set it to FrameWindow, I can see the window borders but not the elements created inside, also I can see the CEGUI cursor.
Here is the code I use to create the elements:
Code: Select all
//The window
Window *pantalla;
try{
pantalla = (DefaultWindow*)WindowManager::getSingleton().createWindow("DefaultWindow");
pantalla->setSize(UVector2(UDim(0,1280), UDim(0,720)));
pantalla->setAlpha(1.0);
pantalla->setPosition(UVector2(UDim(0,0), UDim(0,0)));
}catch(CEGUI::InvalidRequestException &e){
printf("%s\n",e.getMessage().c_str());
Error("Error starting PantallaGUI \n%s", e.getMessage().c_str());
}
//The button
PushButton* guiButton;
try{
guiButton = (PushButton*)WindowManager::getSingleton().createWindow(CEGUI_THEME"/Button");
UVector2 v;
v.d_x.d_offset = 200;
v.d_y.d_offset = 200;
guiButton->setPosition(v);
guiButton->setSize(UVector2(UDim(0,320), UDim(0,40)));
guiButton->setText("Hi");
guiButton->setProperty("HorzLabelFormatting", "RightAligned");
pantalla->addChildWindow(guiButton);
guiButton->show();
guiButton->activate();
guiButton->subscribeEvent(PushButton::EventMouseEnters, Event::Subscriber(&WdgButtonFlash::onMouseOver, this));
guiButton->subscribeEvent(PushButton::EventMouseLeaves, Event::Subscriber(&WdgButtonFlash::onMouseLeaves, this));
}catch(CEGUI::InvalidRequestException &e){
Error("Error starting PantallaGUI \n%s", e.getMessage().c_str());
}
Anyone have an idea of what's happening?
Thanks.
