StaticImage file.jpg

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

djphilipe
Quite a regular
Quite a regular
Posts: 48
Joined: Thu Aug 23, 2007 10:15
Location: Slovakia
Contact:

StaticImage file.jpg

Postby djphilipe » Tue Sep 25, 2007 12:29

How I set some a file JPG into StaticImage(widget). No imageset.
setProperty("Image", ???)

Thanks
Sorry, My english is bad

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Tue Sep 25, 2007 13:30

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.

djphilipe
Quite a regular
Quite a regular
Posts: 48
Joined: Thu Aug 23, 2007 10:15
Location: Slovakia
Contact:

Postby djphilipe » Tue Sep 25, 2007 13:53

Ok, it works.
:)

Thank you

BayerMeister
Just popping in
Just popping in
Posts: 3
Joined: Wed Mar 05, 2008 21:58
Location: CZ

Anf what about the editor?

Postby BayerMeister » Wed Mar 05, 2008 22:15

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?


Return to “Help”

Who is online

Users browsing this forum: No registered users and 9 guests