Code: Select all
CEGUI::Window *myImageWindow = CEGUI::WindowManager::getSingleton().createWindow("TaharezLook/StaticImage","BloodUI");
myImageWindow->setPosition(CEGUI::UVector2(CEGUI::UDim(0, 0), CEGUI::UDim(0, 0)));
myImageWindow->setSize(CEGUI::USize(CEGUI::UDim(1, 0), CEGUI::UDim(1, 0)));
myImageWindow->setProperty("Image", "set:SpellByteImages image:full_image");
APP->ceguiContext->getRootWindow()->addChild(myImageWindow);Which came from:
http://cegui.org.uk/wiki/CEGUI_In_Practice_-_Creating_widgets
I made my own scheme and imageset like so:
Code: Select all
<?xml version="1.0" ?>
<GUIScheme version="5" name="SpellByte">
<Imageset filename="SpellByte.imageset" />
</GUIScheme>Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<Imageset version="2" name="SpellByteImages" imagefile="blood.png" nativeHorzRes="1600" nativeVertRes="900" autoScaled="true" >
<Image name="Blood" xPos="0" yPos="0" width="1600" height="900" />
</Imageset>And here is my log:
Code: Select all
09/04/2014 20:20:53 (Std) * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM -------- *
09/04/2014 20:20:53 (Std) ********************************************************************************
09/04/2014 20:20:53 (Std) ---- Version: 0.8.2 (Build: Aug 28 2013 Debug Microsoft Windows g++ 4.7.2 32 bit) ----
09/04/2014 20:20:53 (Std) ---- Renderer module is: CEGUI::OgreRenderer - Official OGRE based 2nd generation renderer module. ----
09/04/2014 20:20:53 (Std) ---- XML Parser module is: CEGUI::RapidXMLParser - Official RapidXML based parser module for CEGUI ----
09/04/2014 20:20:53 (Std) ---- Image Codec module is: OgreImageCodec - Integrated ImageCodec using the Ogre engine. ----
09/04/2014 20:20:53 (Std) ---- Scripting module is: None ----
09/04/2014 20:20:53 (Std) ********************************************************************************
09/04/2014 20:20:53 (Std) * -------- END OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM -------- *
09/04/2014 20:20:54 (Std) Started creation of Scheme from XML specification:
09/04/2014 20:20:54 (Std) ---- CEGUI GUIScheme name: SpellByte
09/04/2014 20:20:54 (Std) [ImageManager] Started creation of Imageset from XML specification:
09/04/2014 20:20:54 (Std) [ImageManager] ---- CEGUI Imageset name: SpellByteImages
09/04/2014 20:20:54 (Std) [ImageManager] ---- Source texture file: blood.png
09/04/2014 20:20:54 (Std) [ImageManager] ---- Source texture resource group: (Default)
09/04/2014 20:20:54 (Std) [OgreRenderer] Created texture: SpellByteImages
09/04/2014 20:20:54 (Std) [ImageManager] Created image: 'SpellByteImages/Blood' (19447AF8) of type: BasicImage
09/04/2014 20:21:09 (Warn) Property 'HorzExtent' is not writable so it's implicitly banned from XML. No need to ban it manually
09/04/2014 20:21:09 (Warn) Property 'VertExtent' is not writable so it's implicitly banned from XML. No need to ban it manually
09/04/2014 20:21:09 (Std) [OgreRenderer] Created texture: _ogre_tt_tex_0
09/04/2014 20:21:09 (Std) [OgreRenderer] Created texture: Jura-10_auto_glyph_images_32
09/04/2014 20:21:09 (Std) ---- Successfully completed loading of GUI layout from 'VanillaConsole.layout' ----
09/04/2014 20:21:17 (Error) CEGUI::UnknownObjectException in function 'CEGUI::Image& CEGUI::ImageManager::get(const CEGUI::String&) const' (xxx) : Image not defined: set:SpellByteImages image:full_image
09/04/2014 20:21:19 (Std) [OgreRenderer] Destroyed texture: _ogre_tt_tex_0I have tried different images such as
Code: Select all
set:TaharezLook image:full_image
set:TaharezLook image:MenuTop
set:SpellByteImages image:Bloodand no matter what, I get the same message "Image not defined"
Do I need to somehow initialize it or specifically load it?
Here is my initialization:
Code: Select all
LOG("Initializing CEGUI");
// Initialize CEGUI
ceguiRenderer = &CEGUI::OgreRenderer::bootstrapSystem();
// Tell CEGUI in which group to find its resources from Ogre
CEGUI::Font::setDefaultResourceGroup("Fonts");
CEGUI::Scheme::setDefaultResourceGroup("Schemes");
CEGUI::WidgetLookManager::setDefaultResourceGroup("LookNFeel");
CEGUI::WindowManager::setDefaultResourceGroup("Layouts");
CEGUI::ImageManager::setImagesetDefaultResourceGroup("Imagesets");
// Load CEGUI configurations and skin/interface
CEGUI::SchemeManager::getSingleton().createFromFile( "GameMenu.scheme" );
CEGUI::SchemeManager::getSingleton().createFromFile( "TaharezLook.scheme" );
CEGUI::SchemeManager::getSingleton().createFromFile( "VanillaSkin.scheme" );
CEGUI::SchemeManager::getSingleton().createFromFile( "SpellByte.scheme" );
ceguiContext = &CEGUI::System::getSingleton().getDefaultGUIContext();
ceguiContext->getMouseCursor().setDefaultImage( "GameMenuImages/MouseCursor" );
ceguiContext->injectMousePosition(0.0, 0.0);
ceguiContext->getMouseCursor().show();
LOG("CEGUI Initialized");Thank you, Thomas

