how to create a new element ?

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

Thor22
Just popping in
Just popping in
Posts: 7
Joined: Wed Apr 11, 2007 07:54
Contact:

how to create a new element ?

Postby Thor22 » Fri May 18, 2007 13:25

Hi all,

For my project I need to create a rotative element (like a boussole) in ogre3d's engine and then I writed somes methods to render this and I created a new class to create this element.
Next I would like to integrate it to CEGUI's engine and to be able to export it in scripting engine (like .layout and Lua).
My question : How can I do this ? :)

Thanks for help (and sorry if I make some mistakes, I am french ^^)

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

Postby Rackle » Fri May 18, 2007 14:17

Have a read through the Wiki, especially the Falagard stuff. You won't be able to integrate it automatically into the Layout Editor. Not with the current version.

Maybe one day we'll recode Cegui with better descriptions in code, such as "I am a parent widget", "I am a child widget of x", "I can only be included as a child of this parent widget". Yes this is cryptic but if you've read through the Layout Editor code (or this post) you'll understand what I mean...

Thor22
Just popping in
Just popping in
Posts: 7
Joined: Wed Apr 11, 2007 07:54
Contact:

Postby Thor22 » Fri May 18, 2007 16:14

I don't use the layout editor, I write manually my layout files ^^

User avatar
martignasse
Just can't stay away
Just can't stay away
Posts: 227
Joined: Thu Apr 14, 2005 08:10
Location: Lyon, FRANCE

Postby martignasse » Sat May 19, 2007 08:28

hi thor22,

If i anderstand correclty, you want to create a new element in the set of widgets you use in you'r scheme file ?

If it's that, there differents way of doing this.

You can just declare a new widget name in the scheme file derivated from an existing generic widget, and custom it in the look'nfeel file.

Or you can make a completly new widget from scratch. In the CEimageset Editor, there is a new element, the "ElasticBox", who is coded from scratch and derivate from CEGUI::window.

You have to explore the source code to find all what is needed.
You can also look at the CEGUI_TreeControl, made by DrPain

I don't remenber exactly, but there is a thread where crazy eddie talk about what is needed to add a new element to CEGUI.

hope it help

Thor22
Just popping in
Just popping in
Posts: 7
Joined: Wed Apr 11, 2007 07:54
Contact:

Postby Thor22 » Sun May 20, 2007 17:52

Ok I will explore the source code :wink:
But just a last question : Do I need to recompile the CEGUI's source to integrate my new element's code or a include in my project is enough ?

Thanks for all, Thor

User avatar
martignasse
Just can't stay away
Just can't stay away
Posts: 227
Joined: Thu Apr 14, 2005 08:10
Location: Lyon, FRANCE

Postby martignasse » Sun May 20, 2007 20:08

No need to recompile cegui.
You'r new element will be stored in you'r appli.exe file.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 7 guests