CEGUI Layout Editor
For my current Leadwerks project, I need to setup some GUI panels for logging into the game server. The way CEGUI is setup makes writing your own layout very hard by hand. Just take a look at this layout for example. Yea, good luck there.
I gave the Official CEGUI Layout Editor a try. I was hoping I could easily mock up some basic screens that looked nice and just be done with it. Boy was I wrong.
The biggest problem is having to work in the unified coordinate system. Now, while the UCS is a great idea for the internals of a GUI system, it's not a "human" friendly system to actually design with. The visual editing is good enough for rough mock-ups, but when you have to size components the same, align them, and so on, it's nay impossible!
The next problem has to do with the actual implementation of the editor. When you go to select controls, they tend to move. This means you can have everything positioned just how you want it and then mess it up by accident and have to redo it since there is no undo system.
Needless to say, trying to design some GUI screens via the editor was very frustrating. So frustrating, in fact, that I gave up trying to use the tool and decided to write my own.
LayoutEditor.Net is my attempt to write a better CEGUI Layout Editor. I am using C# for this tool because GUI development in C# is fast, easy, and simple. From previous experiences, I've been able to design complex GUI based applications with full polish in a matter of days whereas trying to do the same in C++ would take weeks to months. So far, it's been only a couple of days and progress has been going great.
I am using the .Net DesignSurface component as the primary driver. If you have ever used Visual Studio's GUI editor, then this component is what you are using through the IDE. Tack on a PropertyGrid control and you have the basics of an editor in a matter of minutes.
I used this article, Have a Great DesignTime Experience with a Powerful DesignSurface (Extended) Class, as the start for the project. Since I'm not going to be designing a Window's GUI, but rather a custom CEGUI, I've had to work out some design differences in how everything works together. This involves creating some custom classes to handle the CEGUI properties and map them to Window's Control properties where applicable.
I still have a bit of work to do and then comes the polish and testing phases, but I am looking forward to completing this project. Here are a couple of development screens of what I have so far:
The amazing thing is that there is not that much code, which is something I've always loved about .Net. It really gives new meaning to RAD. I couldn't imagine doing this task in any other language or framework. I was about to start the project in MaxGui, since I'm a license holder, but then I remembered how efficient .Net was. Also, I remembered why I hated MaxIDE so much after working in it for a couple of minutes. My Blide update license ran out earlier this year, so I didn't want to invest any more money into Blitzmax.
I really didn't want to get side tracked from my project, but if there's one thing I've learned about development is that tools matter. The week or so I spend working on this project will pay off in the future as I need to design more GUI screens for my project. Rather than spend time fighting the CEGUI Layout Editor, I'm just going to make a tool that I know will let me get what I need to done fast and easy. Perhaps some other people might be interested in the project for their own work as well. I've always loved tool development, so hopefully I can come up with something useful.
On that note, I'm going to be upgrading to Leadwerks 2.3 soon for the new tools, which should make development even more fun and exciting. Hopefully, I'll be able to get a real project completed in 2010 rather than dillydallying around with no real focus. I've been trying to make a real game since 2004 and I've yet to get anything past simple 2D stuff. I think I've reached a point where I can do it now.
Anyways, hopefully I'll have this all done in no more than a weeks time. If anyone is interested or has some ides about the project, leave a message!
4 Comments
Recommended Comments