Webify your GUI!

Monday, November 26, 2007

Alright, enough of this "art" nonsense. Time for some code updates!

I was looking for a good solution to creating a GUI system and found Navi. We have been using it for our GUI elements inside the in-game editor we are developing and I wanted to show my praise for the beauty that is a web-based GUI.

Navi is a GUI library for Ogre that allows somebody to create the look and feel of a GUI element entirely in HTML + CSS + JS and whatever else Gecko (Firefox's renderer) supports. Check out the Screenshots to see what this looks like.

Using Navi + Lua has allowed Dave to design GUI elements in Dreamweaver and me to code all the logic associated with it in Lua. This means that I only have to touch about 10% of the GUI related code which makes me a very happy programmer.

7 comments:

David Marsh said...

I know you like touching GUI things.

Anonymous said...

Interesting... did you have to add the LUA related parts to orge or was this something that was already there ?

Brian Cronin said...

I try to keep all systems as independent as possible so Lua has nothing to do with Ogre. Ogre doesn't have any idea Lua even exists. But I can modify things in Lua related to Ogre through my own objects (camera, model, kart, etc).

I use the awesome luabind (http://www.rasterbar.com/products/luabind.html) library to bind any code I want Lua to be able to access.

I am going to create a new blog post related to Lua and luabind this week. So stay tuned!!

Anonymous said...

Interesting I am looking forward to that post... I know at work we use LUA a lot but not luabind we just use the c lib... do you find it more useful to use luabind over the stand lua libs ?

Brian Cronin said...

I got sick this week :( so that post is a bit delayed.

I decided to use a binding library to save time initially. The two main options I could find were tolua and luabind. luabind didn't require an extra compile step so it won.

I think the main advantage of using luabind over the c api is the extra features luabind comes with. http://www.rasterbar.com/products/luabind/docs.html#features
One thing I plan to take advantage of soon is inheriting lua classes from c++ classes.

These are all things that you can implement in the c api but it saved me time not having to do that. And saving time on an indie project goes a long way.

P.S. luabind is implemented using TMP (template meta programming) which is ***cartman voice*** sweeeet

Anonymous said...

Genius! That's what this is!

Anonymous said...

Genius! That's what this is!