problem with loading a gui sheet. (not registering scheme)
Posted: Mon Aug 01, 2011 17:51
Ok, well, I'm having this one little problem right now.......anyways, i used CEGUI's layout editor and all seemed good until i tried to use it and got this nasty little error:
Here is my CEGUI init function:
not sure what else to post other then this.......oh wait:
also i thought i'd give the xml layout:
ok that's all i've got.......
Code: Select all
01/08/2011 13:11:19 (Error) CEGUI::UnknownObjectException in file c:\cegui-0.7.4\cegui\src\ceguiwindowfactorymanager.cpp(180) : WindowFactoryManager::getFactory - A WindowFactory object, an alias, or mapping for 'TaharezLook/FrameWindow' Window objects is not registered with the system.
01/08/2011 13:11:19 (Error) CEGUI::InvalidRequestException in file c:\cegui-0.7.4\cegui\src\ceguiguilayout_xmlhandler.cpp(233) : GUILayout_xmlHandler::startElement - layout loading has been aborted since no WindowFactory is available for 'TaharezLook/FrameWindow' objects.
01/08/2011 13:11:19 (Error) WindowManager::loadWindowLayout - loading of layout from file 'mainmenu.layout' failed.
Here is my CEGUI init function:
Code: Select all
bool OgreFramework::initGUI()
{
try
{
m_pOgreRenderer = new CEGUI::OgreRenderer(CEGUI::OgreRenderer::bootstrapSystem());
if(m_pOgreRenderer)
{
return true;
}
CEGUI::Imageset::setDefaultResourceGroup("Imagesets");
CEGUI::Font::setDefaultResourceGroup("Fonts");
CEGUI::Scheme::setDefaultResourceGroup("Schemes");
CEGUI::WidgetLookManager::setDefaultResourceGroup("LookNFeel");
CEGUI::WindowManager::setDefaultResourceGroup("Layouts");
CEGUI::SchemeManager::getSingletonPtr()->create("TaharezLook.Scheme");
}
catch(CEGUI::Exception &e)
{
MessageBoxA(NULL,e.getMessage().c_str(),"",MB_OK | MB_ICONERROR);
}
return true;
}
not sure what else to post other then this.......oh wait:
Code: Select all
try
{
this->m_pWindowRoot = CEGUI::WindowManager::getSingletonPtr()->loadWindowLayout("mainmenu.layout");
m_pMenu = m_pWindowRoot->getChild("main_menu");
m_pNew_Game = reinterpret_cast<CEGUI::PushButton*>(m_pMenu->getChild("New_Game"));
m_pLoad_Game = reinterpret_cast<CEGUI::PushButton*>(m_pMenu->getChild("Load_game"));
m_pSave_Game = reinterpret_cast<CEGUI::PushButton*>(m_pMenu->getChild("Save_game"));
m_pOptions = reinterpret_cast<CEGUI::PushButton*>(m_pMenu->getChild("options"));
m_pExit = reinterpret_cast<CEGUI::PushButton*>(m_pMenu->getChild("Exit"));
m_pNew_Game->subscribeEvent(CEGUI::PushButton::EventClicked,CEGUI::Event::Subscriber(&MenuState::new_game,this));
OgreFramework::getSingletonPtr()->m_pSystem->setGUISheet(m_pMenu);
}
catch(CEGUI::Exception & e)
{
MessageBoxA(NULL,e.getMessage().c_str(),"",MB_OK | MB_ICONERROR);
}
also i thought i'd give the xml layout:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<GUILayout >
<Window Type="DefaultWindow" Name="Root" >
<Property Name="Alpha" Value="0.5" />
<Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
<Window Type="TaharezLook/FrameWindow" Name="main_menu" >
<Property Name="Font" Value="DejaVuSans-10" />
<Property Name="Text" >Menu
</Property>
<Property Name="TitlebarFont" Value="DejaVuSans-10" />
<Property Name="RollUpEnabled" Value="False" />
<Property Name="TitlebarEnabled" Value="True" />
<Property Name="UnifiedAreaRect" Value="{{0.249111,0},{0.195833,0},{0.597744,0},{0.681509,0}}" />
<Property Name="CloseButtonEnabled" Value="False" />
<Property Name="EWSizingCursorImage" Value="set:Vanilla-Images image:MouseArrow" />
<Property Name="NSSizingCursorImage" Value="set:Vanilla-Images image:MouseArrow" />
<Property Name="NESWSizingCursorImage" Value="set:Vanilla-Images image:MouseArrow" />
<Property Name="NWSESizingCursorImage" Value="set:Vanilla-Images image:MouseArrow" />
<Window Type="TaharezLook/Button" Name="New_Game" >
<Property Name="Font" Value="DejaVuSans-10" />
<Property Name="Text" >New Game
</Property>
<Property Name="UnifiedAreaRect" Value="{{0.0122449,0},{0.00677916,0},{0.97653,0},{0.18186,0}}" />
<Property Name="WantsMultiClickEvents" Value="False" />
</Window>
<Window Type="TaharezLook/Button" Name="Save_Game" >
<Property Name="Font" Value="DejaVuSans-10" />
<Property Name="Text" >save game
</Property>
<Property Name="UnifiedAreaRect" Value="{{0.0138056,0},{0.190554,0},{0.972088,0},{0.342834,0}}" />
<Property Name="WantsMultiClickEvents" Value="False" />
</Window>
<Window Type="TaharezLook/Button" Name="Load_Game" >
<Property Name="Font" Value="DejaVuSans-10" />
<Property Name="Text" Value="Load Game" />
<Property Name="UnifiedAreaRect" Value="{{0.0207283,0},{0.356352,0},{0.971008,0},{0.524919,0}}" />
<Property Name="WantsMultiClickEvents" Value="False" />
</Window>
<Window Type="TaharezLook/Button" Name="Options" >
<Property Name="Font" Value="DejaVuSans-10" />
<Property Name="Text" >Options
</Property>
<Property Name="UnifiedAreaRect" Value="{{0.0282913,0},{0.534528,0},{0.961765,0},{0.703095,0}}" />
<Property Name="WantsMultiClickEvents" Value="False" />
</Window>
<Window Type="TaharezLook/Button" Name="Exit" >
<Property Name="Font" Value="DejaVuSans-10" />
<Property Name="Text" >Exit
</Property>
<Property Name="UnifiedAreaRect" Value="{{0.0330532,0},{0.719219,0},{0.955323,0},{0.868241,0}}" />
</Window>
</Window>
</Window>
</GUILayout>
ok that's all i've got.......