CEGUI::Texture -> CEGUI::Image

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

User avatar
thumperj
Not too shy to talk
Not too shy to talk
Posts: 30
Joined: Wed Jan 12, 2005 12:06
Location: Austin, TX
Contact:

CEGUI::Texture -> CEGUI::Image

Postby thumperj » Thu Nov 11, 2004 15:50

1. Make an imageset based off your texture like so:

Code: Select all

Imageset* pImageSet = ImagesetManager::getSingleton().createImageset( strYourImageSetName, pYourTexture );

2. Define an image in your image set like so:

Code: Select all

pImageSet->defineImage( strNameOfNewImage, Point( 0.0f, 0.0f ), Size( usWidth, usHeight ), Point( 0.0f,0.0f ) );

3. Create an image of type StaticImage:

Code: Select all

CEGUI::StaticImage* pNewImage = ( CEGUI::StaticImage* )WindowManager::getSingleton().createWindow(  "TaharezLook/StaticImage", strWindowName );

4. Set the image in the StaticImage to your newly created image from your image set:

Code: Select all

pNewImage->setImage( strYourImageSetName, strNameOfNewImage );

Hope this helps!
Cheers,
Chris


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 4 guests