Migration from Ogre 1.6.4 CEGUI to Ogre 1.7.2 CEGUI 0.7.5

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

stanop182
Just popping in
Just popping in
Posts: 2
Joined: Mon Oct 17, 2011 07:56

Migration from Ogre 1.6.4 CEGUI to Ogre 1.7.2 CEGUI 0.7.5

Postby stanop182 » Mon Oct 17, 2011 08:43

Hi,

I have problem defining images in imageset. CEGUI log is always saying "Imageset::getImage - The Image named 'gui_menu_base' could not be found in Imageset 'gui_menu'."

Code: Select all

CEGUI::Imageset menu_imageset = CEGUI::ImagesetManager::getSingleton().createFromImageFile("gui_menu","overlays/gui_menu.tga");
      menu_imageset.defineImage("gui_menu_base",CEGUI::Point(8.0f, 341.0f),CEGUI::Size(482.0f, 642.0f),CEGUI::Point(0.0f, 0.0f));
      menu_imageset.defineImage("gui_menu_button",CEGUI::Point(32.0f,267.0f),CEGUI::Size(336.0f,58.0f),CEGUI::Point(0.0f,0.0f));
      menu_imageset.defineImage("gui_menu_button_b",CEGUI::Point(32.0f,192.0f),CEGUI::Size(336.0f,58.0f),CEGUI::Point(0.0f,0.0f));

gui_main_menu.create("gui_main_menu182","set:gui_menu image:gui_menu_base",CEGUI::Vector2((app.X_RES-482)/2.0f,(app.Y_RES-642-300)/2.0f),CEGUI::Vector2(482,642),win);
      gui_main_menu.set_visible(false);
      gui_main_menu.get_window()->setAlwaysOnTop(true);

CEGUI::Window *create(const CEGUI::String &name,const CEGUI::String &image,CEGUI::Vector2 pos,CEGUI::Vector2 size,CEGUI::Window *parent)
   {
      CEGUI::WindowManager &wm = CEGUI::WindowManager::getSingleton();

      m_win = wm.createWindow( "TaharezLook/StaticImage",name);
      m_win->setProperty("Image",image);
      
      m_win->setProperty("FrameEnabled","Value=False");
      m_win->setProperty("BackgroundEnabled","Value=False");
      m_win->setPosition(CEGUI::UVector2 ( CEGUI::UDim(0,pos.d_x), CEGUI::UDim(0,pos.d_y)));
      m_win->setSize(CEGUI::UVector2 ( CEGUI::UDim(0,size.d_x), CEGUI::UDim(0,size.d_y)));
      m_win->setVisible(m_visible);
      m_win->setAlpha(m_alpha);
      parent->addChildWindow( m_win );

      m_enabled=true;
      m_name=name;

      return m_win;
   }


I also tried this right after the code where I define images:

Code: Select all

menu_imageset.isImageDefined("gui_menu_base");

and the method isImageDefined returns TRUE.

The image from which I'm creating imageset exist. The code above worked fine in older version of CEGUI and Ogre. I spend last 5 days thinking and googling what could be wrong, without success... PLS HELP :)

Here is the log:

Code: Select all

17/10/2011 10:13:10 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
17/10/2011 10:13:10 (Std)    +                     Crazy Eddie's GUI System - Event log                    +
17/10/2011 10:13:10 (Std)    +                          (http://www.cegui.org.uk/)                         +
17/10/2011 10:13:10 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

17/10/2011 10:13:10 (Std)    CEGUI::Logger singleton created. (07C7CAA8)
17/10/2011 10:13:10 (Std)    ---- Started parse of CEGUI config file ----
17/10/2011 10:13:10 (Std)    ---- Finished parse of CEGUI config file ----
17/10/2011 10:13:10 (Std)    
17/10/2011 10:13:10 (Std)    ********************************************************************************
17/10/2011 10:13:10 (Std)    * Important:                                                                   *
17/10/2011 10:13:10 (Std)    *     To get support at the CEGUI forums, you must post _at least_ the section *
17/10/2011 10:13:10 (Std)    *     of this log file indicated below.  Failure to do this will result in no  *
17/10/2011 10:13:10 (Std)    *     support being given; please do not waste our time.                       *
17/10/2011 10:13:10 (Std)    ********************************************************************************
17/10/2011 10:13:10 (Std)    ********************************************************************************
17/10/2011 10:13:10 (Std)    * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM       -------- *
17/10/2011 10:13:10 (Std)    ********************************************************************************
17/10/2011 10:13:10 (Std)    ---- Version 0.7.5 (Build: Nov 19 2010 Debug Microsoft Windows MSVC++ 8.0 32 bit) ----
17/10/2011 10:13:10 (Std)    ---- Renderer module is: CEGUI::OgreRenderer - Official OGRE based 2nd generation renderer module. ----
17/10/2011 10:13:10 (Std)    ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
17/10/2011 10:13:10 (Std)    ---- Image Codec module is: SILLYImageCodec - Official SILLY based image codec ----
17/10/2011 10:13:10 (Std)    ---- Scripting module is: None ----
17/10/2011 10:13:10 (Std)    ********************************************************************************
17/10/2011 10:13:10 (Std)    * -------- END OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM         -------- *
17/10/2011 10:13:10 (Std)    ********************************************************************************

...
17/10/2011 10:13:23 (Std)    Attempting to create Imageset 'gui_menu' using image file 'overlays/gui_menu.tga'.
17/10/2011 10:13:23 (Error)   CEGUI::UnknownObjectException in file c:\cegui-0.7.5\cegui\src\ceguiimageset.cpp(133) : Imageset::getImage - The Image named 'gui_menu_base' could not be found in Imageset 'gui_menu'.
...

Last edited by stanop182 on Tue Oct 18, 2011 07:30, edited 2 times in total.

stanop182
Just popping in
Just popping in
Posts: 2
Joined: Mon Oct 17, 2011 07:56

Re: Migration from Ogre 1.6.4 CEGUI to Ogre 1.7.2 CEGUI 0.7.

Postby stanop182 » Mon Oct 17, 2011 15:22

Probably solved.
I changed this:

Code: Select all

CEGUI::Imageset menu_imageset = CEGUI::ImagesetManager::getSingleton().createFromImageFile("gui_menu","overlays/gui_menu.tga");


to this( "&" before menu_imageset ):

Code: Select all

CEGUI::Imageset &menu_imageset = CEGUI::ImagesetManager::getSingleton().createFromImageFile("gui_menu","overlays/gui_menu.tga");


And the log error is gone.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 5 guests