The following code works but the elements are not drawn.
Code: Select all
irr::gui::IGUIWindow* GuiMachine::Load( const char* file )
{
// get the screen size
irr::core::dimension2d<u32> size = mpEnv->getVideoDriver()->getScreenSize();
irr::core::stringw fileName = file;
// create the window for this gui scene
irr::gui::IGUIWindow* window =
mpEnv->addWindow(irr::core::recti(0,0,640,480),
false,
&fileName[0]);
// now load the gui scene
if( !mpEnv->loadGUI(file,window) ) // failed
{
window->remove();
window->drop();
printf("failed to load gui scene\n");
return 0;
}
printf("window has been created\n");
return window;
}
Code: Select all
irr::gui::IGUIWindow* GuiMachine::Load( const char* file )
{
// get the screen size
irr::core::dimension2d<u32> size = mpEnv->getVideoDriver()->getScreenSize();
irr::core::stringw fileName = file;
// create the window for this gui scene
irr::gui::IGUIWindow* window =
mpEnv->addWindow(irr::core::recti(0,0,640,480),
false,
&fileName[0]);
// now load the gui scene
if( !mpEnv->loadGUI(file) ) // failed
{
window->remove();
window->drop();
printf("failed to load gui scene\n");
return 0;
}
printf("window has been created\n");
return window;
}