I inherit a ImageItemEntry from ItemEntry. Add a StaticImage and some StaticText to the ImageItem as child windows simply. So, I will write a new render for this type to getItemPixelSize() for my new lady who has some new child, Rather than relying on the text.
All is OK, besides the problem that the title show. how to add a "Renderer" in sample_demo 7 ?
So, CE, Expect for your Detailed answers.
Could you write the code please~ Because I'm a dull child.
thanks~
how to add a "Renderer"?
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: how to add a "Renderer"?
I don't really understand 90% of your post.
When you say Renderer, presumably you mean WindowRenderer? You register those in a similar fashion to the way you registered the Window type itself; there is a CEGUI::WindowRendererManager class, and you can register new types via a templatised function:
You then use an entry in the scheme file to bind all the bits together.
I have no intention of writing a full example of this and posting it here; the technique is used extensively in CEGUI, there's an example in CEImagesetEditor - the 'ElasticBox' type, and I've posted a couple of examples already on the forum (as I recall).
CE.
When you say Renderer, presumably you mean WindowRenderer? You register those in a similar fashion to the way you registered the Window type itself; there is a CEGUI::WindowRendererManager class, and you can register new types via a templatised function:
Code: Select all
CEGUI::WindowRendererManager::addFactory<TplWindowRendererFactory<MyWindowRenderer> >();You then use an entry in the scheme file to bind all the bits together.
I have no intention of writing a full example of this and posting it here; the technique is used extensively in CEGUI, there's an example in CEImagesetEditor - the 'ElasticBox' type, and I've posted a couple of examples already on the forum (as I recall).
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Who is online
Users browsing this forum: Baidu [Spider] and 27 guests
