Page 1 of 1

StaticImage file.jpg

Posted: Tue Sep 25, 2007 12:29
by djphilipe
How I set some a file JPG into StaticImage(widget). No imageset.
setProperty("Image", ???)

Thanks
Sorry, My english is bad

Posted: Tue Sep 25, 2007 13:30
by Rackle
Have a look at WidgetGalore

Code: Select all

/* StaticImage */
ImagesetManager::getSingleton().createImagesetFromImageFile("ImageForStaticImage", "GPN-2000-001437.tga");
DefaultWindow* staticImage = static_cast<DefaultWindow*>(winMgr.getWindow("StaticImage"));
staticImage->setProperty("Image", "set:ImageForStaticImage image:full_image"); // "full_image" is a default name from CEGUIImageset::Imageset()


That snippet uses a StaticImage created from a .layout. Replace the second line of code with a call to createWindow() if you are programatically creating the StaticImage.

Posted: Tue Sep 25, 2007 13:53
by djphilipe
Ok, it works.
:)

Thank you

Anf what about the editor?

Posted: Wed Mar 05, 2008 22:15
by BayerMeister
And how can one set the image from the CELayoutEditor?
The "Image" property of the StaticImage is there, but how do I specify the image I want here? Is it possible?