Relevant code:
Initializing all the windows settings. The windows are loaded from a .layout file. But there isn't anything too strange in it and nothing is transparent.
Code: Select all
int MyApp::ceguiInit ( )
{
/// CEGUI Stuff Taken DIRECTLY from it's tutorials
CEGUI::WindowManager& wmgr = CEGUI::WindowManager::getSingleton();
// initialise the required dirs for the DefaultResourceProvider
CEGUI::DefaultResourceProvider* rp = static_cast<CEGUI::DefaultResourceProvider*>
(CEGUI::System::getSingleton().getResourceProvider());
rp->setResourceGroupDirectory("schemes", ceGuiDataRoot + "/datafiles/schemes/");
rp->setResourceGroupDirectory("imagesets", ceGuiDataRoot + "/datafiles/imagesets/");
rp->setResourceGroupDirectory("fonts", ceGuiDataRoot + "/datafiles/fonts/");
rp->setResourceGroupDirectory("layouts", ceGuiDataRoot + "/datafiles/layouts/");
rp->setResourceGroupDirectory("looknfeels", ceGuiDataRoot + "/datafiles/looknfeel/");
rp->setResourceGroupDirectory("lua_scripts", ceGuiDataRoot + "/datafiles/lua_scripts/");
// This is only really needed if you are using Xerces and need to
// specify the schemas location
rp->setResourceGroupDirectory("schemas", ceGuiDataRoot + "/datafiles/xml_schemas/");
//// set the default resource groups to be used
CEGUI::Imageset::setDefaultResourceGroup("imagesets");
CEGUI::Font::setDefaultResourceGroup("fonts");
CEGUI::Scheme::setDefaultResourceGroup("schemes");
CEGUI::WidgetLookManager::setDefaultResourceGroup("looknfeels");
CEGUI::WindowManager::setDefaultResourceGroup("layouts");
CEGUI::ScriptModule::setDefaultResourceGroup("lua_scripts");
// setup default group for validation schemas
CEGUI::XMLParser* parser = CEGUI::System::getSingleton().getXMLParser();
if (parser->isPropertyPresent("SchemaDefaultResourceGroup"))
parser->setProperty("SchemaDefaultResourceGroup", "schemas");
//CEGUI::WidgetLookManager::getSingleton().( "WindowsLook.looknfeel" );
CEGUI::SchemeManager::getSingleton().create( "WindowsLook.scheme" );
CEGUI::SchemeManager::getSingleton().create( "TaharezLook.scheme" );
CEGUI::FontManager::getSingleton().create( "DejaVuSans-10.font" );
CEGUI::System::getSingleton().setDefaultFont( "DejaVuSans-10" );
//CEGUI::System::getSingleton().setDefaultMouseCursor( "WindowsLook", "MouseArrow" );
//System::getSingleton().setDefaultToolTip( "TaharezLook/Tooltip" );
CEGUI::Window* myRoot;
//loads the layout
try
{
myRoot = CEGUI::WindowManager::getSingleton().loadWindowLayout("start3.layout");
}
catch(...)
{
return 0;
}
CEGUI::System::getSingleton().setGUISheet( myRoot );
CEGUI::WindowManager::getSingleton().getWindow("fWnd")->hide();
return 1;
}
rendering the gui at the end of the scene.
Code: Select all
dxSprite->End();
#ifdef _USE_CEGUI_LIBS
// draw GUI
CEGUI::System::getSingleton().renderGUI();
#endif
//stop rendering
dxDev()->EndScene();
//display the back buffer on _the screen
dxDev()->Present(NULL, NULL, NULL, NULL);
Hiding and showing the window.
Code: Select all
else if (Utils::keyIsPressed(VK_F3))
{
static bool showTestWindow = false;
//fWnd->setVisible( (showTestWindow = !showTestWindow) );
//CEGUI::WindowManager::getSingleton().getWindow("fWnd")->setVisible( (showTestWindow = !showTestWindow) );
if(showTestWindow = !showTestWindow)
{
CEGUI::WindowManager::getSingleton().getWindow("fWnd")->show();
CEGUI::WindowManager::getSingleton().getWindow("fWnd")->activate();
CEGUI::WindowManager::getSingleton().getWindow("fWnd")->invalidate();
}
else
CEGUI::WindowManager::getSingleton().getWindow("fWnd")->hide();
}
The first time I show the window
The second time
It does the exact same thing with the WindowsLook scheme. Does anyone know what could be causing this?