kingdranix
20-10-2007 08:48:55
Hi, it's me again.
How do I set background image? The codes I used crashes whenever I hover to the top of my game. Here's the code:
After doing further testing, I found that it also crashes when I set it to
This happens when the mouse cursor touches the top image border and it crashes on
QuickGUIWidget.cpp line 881.
I also tried with different images and power of two textures. It also crashes with png.
Edit: I found out how to set background image but the above method crashes.
I use this:
How do I set background image? The codes I used crashes whenever I hover to the top of my game. Here's the code:
QuickGUI::Image * bgImage = m_Sheet->createImage();
bgImage->setDimensions(QuickGUI::Rect(0,0,1024,768));
bgImage->setTexture("background.jpg", false);
After doing further testing, I found that it also crashes when I set it to
bgImage->setDimensions(QuickGUI::Rect(200,200,500,500));
This happens when the mouse cursor touches the top image border and it crashes on
QuickGUIWidget.cpp line 881.
Ogre::ColourValue c = mWidgetImage->getColourAt((relX * mWidgetImage->getWidth()) - 1, (relY * mWidgetImage->getHeight()) - 1,0);
I also tried with different images and power of two textures. It also crashes with png.
Edit: I found out how to set background image but the above method crashes.
I use this:
m_Sheet->setTexture("background.jpg");