Page 1 of 1

Looking for help creating a new?? widget

Posted: Mon Apr 03, 2006 09:43
by Lee04
Hi

I am new to CEGUI, but I would like to make editor for real time materials.
I have used another tool that has ceased too exist on the market and I was thinking of making my own incarnation..

The basic building block GUI widget looks like this.

It has a real-time 3D window displacing the material up to this point in the shader.

It can have n rows of input (left side) / output (right side).
If no input is connected and you click on the row or drag on it you can set a variable if it's variable and a scalar or else another edit menu opens up.

If you pass over or you try to connect a none compatible input line the connector is lit red, if it's OK and pass over it lit.’s green.
If a row isn't needed for instance if you delete a pass row in a technique version of this widget, the row in the technique widget for that pass is deleted and the widget decreases in height size. Or if the row can't be done this way at least the name of the pass on the row is deleted and a event is sent to delete the incoming line to this row.

Image

Now to my question is there a widget like this or something that I can start from and expand from and how do I make lines between them editable and selectable. Some lines can go to several different places.

I also need the lines and these widgets to be auto placed or manually and auto routed to look nicely placed in the work area.

I am looking for help on all of this. If you are looking for something to do please lend me a hand here.

For me it looks like they just combined several widgets, the rows are "just" squared buttons that in turn contains on or two radion buttons inside on each side of the button to look as connectors and the hole widget also has a preview area.

Can this be build with XML scripiting and existing widgets?
Or how should it be implemented?

It's also has a selection border. It's movable and when moved sends event to update the wiring.

Wires has small arrows and different colors and a selection colour.

Thanks.

Posted: Mon Apr 03, 2006 11:59
by martignasse
well, i'll try to respond to all you'r questions.

first of all, the main problem for what you try to achieve is the lake of line in the cegui renderer for now(the renderer just render box). so, the connexion line for the skematik isn't possible for now. :cry:

It has a real-time 3D window displacing the material up to this point in the shader.
for this, you just have to make a render to texture and put the texture in a static image (there is some examples around, don't remenber where)

for the rest of the widget, you can start from a listbox, but the incoming 0.5 version, not the one in the 0.41.

interesting project indeed.

Hi

Posted: Mon Apr 03, 2006 12:48
by Lee04
Hi and thanks for your effort, but I need a lot more help, the line thing is hard ofcourse. Listbox how does it look work? is pre beta 5 available know to test? How do I proceed?

I am usinig Ogre to render.

Thanks

Posted: Mon Apr 03, 2006 14:04
by martignasse
I am usinig Ogre to render.
so, you'll find some examples of render to texture on the orge wiki :)


the line thing is hard ofcourse
for this, the primari thing to do is to add to the renderer the ability to render other thing than box, like line. it's a deep change, to see with the cegui team, i think.


Listbox how does it look work? is pre beta 5 available know to test? How do I proceed?
the listbox in 0.5 will work similary than menu in 0.41, where you can find some infos in the API Reference it use the ItemEntry and ItemListBase.

hope it help.

PS : i'm very interested in you'r project (i wanted to make a kind of generic skematic view).

Posted: Mon Apr 03, 2006 14:37
by Lee04
PS : i'm very interested in you'r project (i wanted to make a kind of generic skematic view).


I played with the cegui editor and you can add a checkbox to button and buttons to a menu etc. So what to do is to be able to swap colors on check boxes (green/red/gray/black) depending on roll over and mode.
I also want to add a selection frame on a selected widget,

The line render could simply render the box widgets to a z buffer to use it as a mask when it draws the lines. All the widgets need to have a mask that let's the part of the line that connects to be draw but otherwise it will mask.

The lines can be draw using Ogre. Or maybe cegui render but I don't know it as I know Ogre. Maybe it's the same kind of thing?

Posted: Tue Apr 04, 2006 07:30
by martignasse
So what to do is to be able to swap colors on check boxes (green/red/gray/black) depending on roll over and mode.
should be easy to do at the looknfeel level.

I also want to add a selection frame on a selected widget
not sure if it can be made just with some xml, or if need some code.

The line render could simply render the box widgets to a z buffer to use it as a mask when it draws the lines. All the widgets need to have a mask that let's the part of the line that connects to be draw but otherwise it will mask.
don't really see what you mean here

The lines can be draw using Ogre. Or maybe cegui render but I don't know it as I know Ogre. Maybe it's the same kind of thing?
the fact is the cegui renderer is made to be independent from graphic lib used( 3d lib like ogre or even sdl if you want). for now it's pretty basic and manage to render only some box, the perfect way should be to add line rendering at cegui renderer level (like discussed in this thread), but it's a deep core add to the project .