Right Brain Games GUI for Ogre [New Release Available]

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 99
Contact:

Post by Wolfmanfx »

WoW that is very nice :)
Maybe consider a dual license like OGRE.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

Let me be the latest person to say that is seriously impressive work. Not just for Ogre - I'm sure the whole Open Source games community would be extremely intersted.

With that in mind, how would an integration work? Can the whole GUI be largely engine/API indepentant - so that you can just implement a render target or something for whatever you choose to use?

Also what are the dependancies? And how does the message system work (listener pattern, signal-slot, etc)?

Again, seriously cool stuff!
grizzley90
Gnome
Posts: 318
Joined: Wed Jan 18, 2006 7:22 pm
Location: Montreal, Canada

Post by grizzley90 »

:shock: :shock: :shock: Need to have! Out of curiosity, do you have any scripting languages for the gui?
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

esuvs wrote:Can the whole GUI be largely engine/API indepentant - so that you can just implement a render target or something for whatever you choose to use?
I hope not.
That would lead to less than ideal Ogre performance and code bloat IMO.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

jacmoe wrote:
esuvs wrote:Can the whole GUI be largely engine/API indepentant - so that you can just implement a render target or something for whatever you choose to use?
I hope not.
That would lead to less than ideal Ogre performance and code bloat IMO.
Not really, as I understand it this is the approach which CEGUI takes. There are backends available for Ogre, OpenGL, DirectX, and others. I don't see any reason to directly tie it to Ogre, and by making it accessible to more people you get a much larger communuity for support, addons etc.

You also improve the design - I'm sure the design of Ogre's renering system benefited from having to consider the requirements of more than one API.
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post by nikki »

Wow. That looks really cool. But, I hope that it is simpler to use than CEGUI, because I had to keep scratching my hair off until I finally decided to use BetaGUI. :)
User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1141
Joined: Tue Jul 06, 2004 5:57 am
x 151
Contact:

Post by spookyboo »

Very useful for me. Looks great sirshane!
p.s Great to see that Antillia is still alive, although I get the impression it doesn't use Ogre anymore.
Van
Hobgoblin
Posts: 512
Joined: Fri Nov 19, 2004 3:56 am
Contact:

Post by Van »

Oh yes! You have our attention as well.

Can you give us a complete synopsis of it's capabilities?

Does it have an Event System?
Does it come with the window editor?
What widgets do you currently have? Push Button? Tree View? Listbox? Editbox?
Does it support multiple sheets?

Code implementation samples would be nice to see.
Stop Global Whining.
User avatar
SirShane
Gremlin
Posts: 185
Joined: Thu May 31, 2007 5:36 am
Contact:

Post by SirShane »

With that in mind, how would an integration work? Can the whole GUI be largely engine/API indepentant - so that you can just implement a render target or something for whatever you choose to use?
The GUI was originally designed for Toi, but it never actually touches the Toi rendering API. Instead, it only uses a single interface for drawing graphics (Called the GuiBrush). This makes it particularly easy to port, because it means all you really need to do is re-implement this brush interface (Which is what I did for Ogre. In fact, I already have the GUI rendering inside Ogre now.)
Also what are the dependancies? And how does the message system work (listener pattern, signal-slot, etc)?
The only major dependency is FreeType, which is used for rendering the fonts. Of course, now that it's being ported to Ogre you'll need that too. The GUI uses a very simple listener pattern, where you attach a single callback to a widget using the 'setCallback' method. Originally it used a single/slot system. We found that in practice, even for complex GUIs, it was overly complex and confusing. (Do you attach a callback to the "onPush" slot or the "onPressed" slot!?)
Out of curiosity, do you have any scripting languages for the gui?
All widgets and windows implement a basic interface called 'Object', which provides basic scripting and introspection capabilities. You can get a list of attributes on a widget dynamically. This makes it particularly well suited for scripting. Other than that, there is no built-in scripting language - but I've personally integrated it with Lua and our custom scripting language just fine. So it integrates great with scripting languages. :)
Does it come with the window editor?
I plan to embed Toi's window editor into the library, so you can call a function named 'OpenWindowEditor' someplace and have it instantly open up in Ogre. This is useful because it gives you a nice little embedded Gui editor in a function for your engine. :)
What widgets do you currently have? Push Button? Tree View? Listbox? Editbox
A ton! If you watch the video, you'll see a huge number of widgets shown in the menu. Off the top of my head, we have: push button, tree view, list box, edit box, option button, check button, progress meter, evaluator (text entry for numbers with plus/minus button), flow diagram (Seen in the particle editor video), color selector, color range selector, spline editor... I can't even remember all of them. There's a lot. :P
Does it support multiple sheets?
If by sheets you mean multiple separate GUI layouts, then yes, it supports that. :)
Shane Parker
Right Brain Games
http://www.rightbraingames.com
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

It really is seriously cool. Without wising to offend any other projects, it appears to be a huge step over CEGUI which is probably the most widely used open source game gui. And seeing as CEGUI seems to be moving at a slow pace at the moment, it really couldn't have come at a better time.

I'm sure that other open source engines will be happy to implement their own GuiBrush - just make sure they find out about it! Hopefully it can have a website of something though those videos really say it all :D
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Post by Kencho »

esuvs wrote:GuiBrush
Threpwood?

I'm sorry for the off-topic comment, but had to say that :lol:
Image
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

Wow, this really is beyond expectations! :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
kcbanner
Goblin
Posts: 208
Joined: Sat May 05, 2007 4:49 pm

Post by kcbanner »

This looks so cool, my upcoming game will have to use this.

Any idea on a time frame of when we can get our hands on the first release?

Thanks!

-KCBANNER
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

Post by PolyVox »

Kencho wrote:
esuvs wrote:GuiBrush
Threpwood?

I'm sorry for the off-topic comment, but had to say that :lol:
Well it took a little googling before I workd out what you were talking about - but I got there in the end?

http://en.wikipedia.org/wiki/Guybrush_Threepwood
CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 58
Contact:

Post by CABAListic »

You do not know Guybrush Threepwood?! The only pirate worth mentioning besides Captain Jack Sparrow? ;)
User avatar
SirShane
Gremlin
Posts: 185
Joined: Thu May 31, 2007 5:36 am
Contact:

Post by SirShane »

Any idea on a time frame of when we can get our hands on the first release?
Maybe as soon as a few days. The hardest work is already done (Getting it to render in Ogre), so the rest is mostly porting all the widgets and the editor.
Shane Parker
Right Brain Games
http://www.rightbraingames.com
User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
x 16
Contact:

Post by KungFooMasta »

:shock:

Wow, this looks awesome! How many people worked on this, and for how long?

Along with the editor, you should make a demo app, to illustrate how to use the library with Ogre and OIS. :)

Lots of questions:
Can you add user defined event handlers? How does the event system work?
Is it easy to disable/change those window animations? (lol)
Is it easy to create a custom widget?
Can you have a line of text with characters of varying color?
Can you post a snippet of your theme file, so we can see how easy it would be to set the skin of a particular widget?

Sorry for asking so many questions... :wink:

KungFooMasta
User avatar
SpannerMan
Gold Sponsor
Gold Sponsor
Posts: 446
Joined: Fri May 02, 2003 10:05 am
Location: UK
Contact:

Post by SpannerMan »

Well this thread has just blown my socks off.

I really cant wait to see the performance of this thing running in Ogre, and if it equals or exceeds that of Cegui Im going to have a little dance around my bedroom in my underpants.
Murmandamus
Halfling
Posts: 48
Joined: Thu May 31, 2007 8:50 pm

Post by Murmandamus »

I'll get my camera :lol:

Seriously though, this is sounding better and better (talking about the GUI now...)
User avatar
tau
Silver Sponsor
Silver Sponsor
Posts: 413
Joined: Wed Feb 11, 2004 11:44 am
Location: Austin (that's kept wierd :))

Post by tau »

Holy Green Cow! That's one of the best pieces of work I've ever seen!

I do also join the begging crowd for the release :D

I think Ogre also uses FreeType, so it should not be an additional version/file, right?
Twitter: Tau Powered
User avatar
SirShane
Gremlin
Posts: 185
Joined: Thu May 31, 2007 5:36 am
Contact:

Post by SirShane »

Can you add user defined event handlers? How does the event system work?
The event handling system is very simple. You basically create a callback class that inherits from GuiEventCallback, and attach an instance of your callback to a widget using a setCallback method. Each widget can only have one callback. This is less flexible than a signal/slot system, but in practice we found that a stricter, simpler callback system is much better than a more complex and more flexible signal/slot system.
Is it easy to disable/change those window animations?
Yes, you'll be able to do this.
Is it easy to create a custom widget?
Yes, it's very simple. I'll be sure to make some examples. The simplified GuiBrush interface makes it very easy to draw 2D polygons, lines and rectangles without having to deal with vertex buffers, etc.
Can you have a line of text with characters of varying color
This is not yet supported, but probably will be sometime after the first release. It's a feature I've always wanted, but hasn't been a big priority for us.
Can you post a snippet of your theme file, so we can see how easy it would be to set the skin of a particular widget?
Sure. Here's a definition of the window border you see in the video.

Code: Select all


begin border Window
	part topleft "0 0 10 22"
	part topright "51 0 10 22"
	part bottomleft "0 30 8 15"
	part bottomright "53 30 8 15"

	part top "20 0 6 22"
	part left "0 23 7 5"
	part right "54 23 7 5"
	part bottom "24 30 4 15"

	minsize "140 74"

	adjust "7 22 -7 -15"

	bgcolor1 default "0.78 0.78 0.78 1.0"
	bgcolor2 default "0.70 0.70 0.70 1.0"

	textpos "0 8"

	texture default "new_window.png"

	closebutton default "close_button.png"
	closebutton inactive "close_button.png"

	closebuttonpos "-18 8"
end
I hope it's pretty self explanatory, but I'll try to document everything in the initial release.
I think Ogre also uses FreeType, so it should not be an additional version/file, right?
Ogre also uses FreeType, so in theory the Gui could use Ogre as it's font loader. However, the Gui already has its own font loading system in place, so I'll probably just use that because it's easier.
Shane Parker
Right Brain Games
http://www.rightbraingames.com
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

Nice work

I just love wobbly windows :)
Already got used to them in Ubuntu Fiesty Fawn + Desktop effects with Beryl :)
User avatar
tau
Silver Sponsor
Silver Sponsor
Posts: 413
Joined: Wed Feb 11, 2004 11:44 am
Location: Austin (that's kept wierd :))

Post by tau »

SirShane wrote:
tau wrote:I think Ogre also uses FreeType, so it should not be an additional version/file, right?
Ogre also uses FreeType, so in theory the Gui could use Ogre as it's font loader. However, the Gui already has its own font loading system in place, so I'll probably just use that because it's easier.
That's cool!

Is it possible to insert a flash, Gecko(HTML viewer )or what ever "active" external control, or it's just a matter of creating a custom widget? Will it be possible to set a refresh rate for such widget?
Twitter: Tau Powered
User avatar
SirShane
Gremlin
Posts: 185
Joined: Thu May 31, 2007 5:36 am
Contact:

Post by SirShane »

Is it possible to insert a flash, Gecko(HTML viewer )or what ever "active" external control, or it's just a matter of creating a custom widget?
I'm not entirely sure what you mean. If you're asking whether or not it's possible to create a web browsing widget, then yes. I plan to add this possibly in the first release (using LLMozLib).
Will it be possible to set a refresh rate for such widget?
Because all windows are buffered, widgets only re-draw when you tell them to. A widget can refresh as often or as little as you like.
Shane Parker
Right Brain Games
http://www.rightbraingames.com
User avatar
Evak
Orc Shaman
Posts: 707
Joined: Sun Apr 02, 2006 7:51 pm
Location: Sacramento, CA
x 1
Contact:

Post by Evak »

This looks very interesting indeed. Cegui seems ok for me as an artist to create skins, but the coders all hate it with quite marked passion.

Excited about giving this a good work over :)
Post Reply