Make a banner using CEGUI

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

iversion
Just popping in
Just popping in
Posts: 18
Joined: Sat Jun 24, 2006 05:03

Make a banner using CEGUI

Postby iversion » Fri Aug 04, 2006 11:00

In my game, I want to use some images to make a banner, which would occupy the whole part of the top of screen.
My idea is as follows:
I divide the banner three parts, one is the front end the banner, the second is the end of the banner, both of them are some logo images. The last one is the middle of the banner, which is composite of pure color.
What I want to make is as follows:
Image
I hope that I can make the effect like the gray blue buttom part in the picture.
Anybody knows how to make it?
Thank you in advance:)

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Sat Aug 05, 2006 21:46

I'm not sure which version of the code you are using, or if you are using the Falagard system for skinning - but you can do what you need by creating a custom skin for a StaticImage (if you are using 0.5.0 code, you can use DefaultWindow which would be even better). If you use a StaticImage with the frame and background disabled, then just provide ImagerySections with your custom rendering, and apply these in the appropriate state definitions.

Effectively you just need an ImagerySection with three ImageryComponent definitions in your WidgetLook; one ImageryComponent for each of the end pieces and one for the central area. It's possible to add PropertyDefinitons to the WidgetLook in order to have your logos and colours assignable in code or layouts by using the properties system.

The best advice is to look through some of the simpler entries in the looknfeel files, to get a feel for what's possible and then modify one of those until it does what you want. If you need more specific help, post again - though try to avoid asking us to write the whole WidgetLook for you :P

CE.

iversion
Just popping in
Just popping in
Posts: 18
Joined: Sat Jun 24, 2006 05:03

Postby iversion » Thu Aug 17, 2006 02:30

CE, thank you very much!
I succeed in making a banner according to your method!
I modify the StaticImage in the TaharezLook.looknfeel, and achieve the effect.
But new problem comes! I have to add another banner in the bottom of the window. And now in the looknfeel file, the StaticImage with the frame and background disabled has an ImagerySection with three ImageryComponent definitions in my WidgetLook.
In my case, should I just add another ImagerySection for the bottom banner, then how can I assign different ImagerySection to the different banner?
According to CE: "It's possible to add PropertyDefinitons to the WidgetLook in order to have your logos and colours assignable in code or layouts by using the properties system. "
Can I make it in CE's way?
BTW, I use Falagard system and CEGUI 4.0 sdk for skinning.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 7 guests