Using Overlays to create a complete GUI

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
Nils
Greenskin
Posts: 120
Joined: Tue Sep 05, 2006 8:50 pm
Location: Neuss, Germany
Contact:

Using Overlays to create a complete GUI

Post by Nils »

Hi,

as neither CEGUI nor BetaGUI convinced me, I'm creating an "OgreGUI", that uses a different approach:

It completely uses the ogre overlay system to create a full-featured GUI. It will be small and easy to use. It's done by registering overlay factories to ogre, so the entire gui can be created through an overlay script, introducing more overlay elemnt types with custom attributes.

For example, a button is derived from Ogre::PanelOverlayElement and would be created like that:

Code: Select all

mainmenu
{
	container Button(startgame)
	{
		metrics_mode relative
		material mainmenu

		left 0.1
		top 0.1
		width 0.2
		height 0.1

		uv_coords         0   0   0.5 0.5
		uv_coords_over    0.5 0   1   0.5
		uv_coords_pressed 0   0.5 0.5 1
	}
}
This is work in progress, but as it is done, I'll post some code so everyone can use it for free.

I hope that something like that doesn't exist yet, but even if it is the case, it isn't that much work and it's working fine for me.

It's just the easiest way for me to set up a small functional gui without the need to define coordinates in my code.

Nils
User avatar
SunSailor
Gnoll
Posts: 699
Joined: Sun Jan 02, 2005 5:45 pm
Location: Velbert, Germany
x 2
Contact:

Post by SunSailor »

Actually, this was the state in azatoth, but the GUI code was droped. The overlay capabilities are the remains of this.
User avatar
Occulis
Halfling
Posts: 91
Joined: Tue Mar 29, 2005 7:29 pm
Location: Houston, TX
Contact:

Post by Occulis »

Sounds good to me!
Lord LoriK
Goblin
Posts: 254
Joined: Tue Feb 13, 2007 5:33 am

Post by Lord LoriK »

I'd really like to see what you do, whenever it's done. I don't like CEGUI either, because it's too bloated for my needs, and it adds to the DLL amount I have to release in my distribution package, something I don't like at all. Right now BetaGUI provides me what I need, but I had thought to do something in the lines of your OgreGUI myself to replace it when my project gets to a more advanced state.

Go ahead! And please, list the features you'll be inlcuding to get some feedback from the community, because I'm sure you'll get more support than you think you could.
IceDragon
Gnoblar
Posts: 11
Joined: Sun Jul 11, 2004 2:08 pm
Location: Germany

Post by IceDragon »

Hi, nice idea, but aren't Overlays a bit too restricted for this purpose?

As far as I know they don't support clipping and stuff like that.. or do you want to add all the missing functionality to the existing overlays?
big_o
Goblin
Posts: 279
Joined: Sun Feb 19, 2006 1:08 am

Post by big_o »

I'm kind of doing the same thing right now, minus the overlay factories. They don't support clipping but thatshouldn't be tohard to implement. I just finished writing some code that creates a kind of list box and inserts a new line character in string when ever the width of the string exceeds a predefined width. It shouldn't be that hard to implement cliping.
User avatar
madmark
Goblin
Posts: 292
Joined: Fri Jul 22, 2005 8:14 pm
Location: Midwest USA
Contact:

Post by madmark »

Instead of starting from scratch, maybe you could look into OpenGUI at http://opengui.rightbracket.com
Arcanor
Halfling
Posts: 63
Joined: Wed Jan 24, 2007 4:21 pm
Contact:

Post by Arcanor »

Unfortunately it looks like OpenGUI is in the process of being abandoned, or at least has slowed to a stop for now. The 0.9 release date of March 15th came and went with no activity on their bug tracker or forums, and the two (apparently) main developers there have both said they've got no time for the project at present.

http://opengui.rightbracket.com/phpBB2/ ... c.php?t=64

I was really looking forward to seeing what OpenGUI could do, but it looks like that's not likely any time soon, if ever.

EDIT: hmm, I just noticed that madmark IS one of the developers of OpenGUI. Perhaps he has more to say... ?
Arcanoria - a SMORPG project
http://www.arcanoria.com
User avatar
Numsgil
Gremlin
Posts: 197
Joined: Sun Jan 29, 2006 10:20 pm

Post by Numsgil »

For me personally, I'd like to see a GUI with a proprietary WYSIWYG editor. XML is fun and all, but GUIs are things that really need to be built with GUIs :)

Even if OpenGUI is slowing down, from what I've seen of it so far, it would probably be a decent place to start. It's really not all that big of a library, so it would imaginably be pretty easy to at the very least use it as a base to extend.
Darwinbots, leading amateur artificial life simulator.
Post Reply