Until now i did this:
Crosshair.imageset
Code: Select all
<?xml version="1.0" ?>
<Imageset Name="Crosshair" Imagefile="crossHair2.png" NativeHorzRes="800" NativeVertRes="600" AutoScaled="true">
<Image Name="crossHair2" XPos="0" YPos="0" Width="33" Height="33" />
</Imageset>
and i got this error:
CEGUI.log
Code: Select all
02/08/2008 18:58:42 (Error) CEGUI::UnknownObjectException in file \Projects\CEGUI\cegui_mk2-v0-6-2003\src\CEGUIImagesetManager.cpp(183) : ImagesetManager::getImageset - No Imageset named 'Crosshair' is present in the system.
This error tells me that i have to target this new imageset file somehere else but where?
Do i have to create other file?
I tryed this:
Code: Select all
#include "cGUIInterface.h"
cGUIInterface::cGUIInterface(cGraphicalInterface *graphicalInterface)
{
// setup GUI system
mGraphInterface = graphicalInterface;
mGUIRenderer = new CEGUI::OgreCEGUIRenderer(mGraphInterface->getWindow() , Ogre::RENDER_QUEUE_OVERLAY, false, 3000, mGraphInterface->getSceneManager());
mGUISystem = new CEGUI::System(mGUIRenderer);
mWindowManager = &CEGUI::WindowManager::getSingleton();
CEGUI::Logger::getSingleton().setLoggingLevel(CEGUI::Informative);
CEGUI::DefaultResourceProvider* rp = static_cast<CEGUI::DefaultResourceProvider*>
(CEGUI::System::getSingleton().getResourceProvider());
rp->setResourceGroupDirectory("imagesets", "./ogrenew/DarkFuture/Media/gui/Imagesets");
Imageset* wlis = ImagesetManager::getSingleton().createImageset(
"Crosshair.imageset", "imagesets");
}
void cGUIInterface::loadScheme()
{
CEGUI::SchemeManager::getSingleton().loadScheme("TaharezLookSkin.scheme");
}
void cGUIInterface::setImage()
{
MouseCursor::getSingleton().setImage("Crosshair", "crossHair2");
}
void cGUIInterface::setPosition()
{
MouseCursor::getSingleton().setPosition(CEGUI::Point(385,285));
}
void cGUIInterface::createCrosshair()
{
//loadScheme();
setImage();
setPosition();
}
cGUIInterface::~cGUIInterface()
{
}
and gave me a memory error in this line:
r
Code: Select all
p->setResourceGroupDirectory("imagesets", "./ogrenew/DarkFuture/Media/gui/Imagesets");
I think im not writing the correct path, i have the foler here:
Code: Select all
C:\ogrenew\DarkFuture\Media\gui\Imagesets
Can i use this kind of code with ogre or do i have to use ogre specific code like i see in a post that used ogre resource manager ( http://www.cegui.org.uk/phpBB2/viewtopic.php?t=3440 ) ?
Im asking this because i can get more information use only CEGUI code than use OGRE/CEGUI code
Thanks in advance!