Jump to content
  • entries
    8
  • comments
    17
  • views
    15,049

CEGUI Layout Editor


Drew_Benton

6,877 views

 Share

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:

16911259.th.png20016083.th.png

 

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!

 Share

4 Comments


Recommended Comments

Tools certainly do matter. And using C# for your editor seems like a good move. I had no idea about the DesignSurfaceExt, that's pretty neat.

 

MaxIDE, or any IDE tool I've used is fine for very simple interfaces but as soon as you need to create anything really useful it becomes more convoluted than a Hideo Kojima storyline. Talk about messy.

 

I've always avoided CEGUI just because of the editor and the difficulty of creating new themes. It's always been easier and faster to roll my own interface than try and make something with that one.

 

I should think using the kind of designer you're working on would be familiar to everyone using it. So good luck to you it sounds like a great idea.

Link to comment

Sounds great. I've never tried the official CEGUI Layout Editor but I'll take your word for it. Sounds like this would be a really useful tool.

 

I used to use Borland C++ Builder 6, years ago, and that was a really Rapid Application Development system and great for building tools.

Link to comment

Tools certainly do matter. And using C# for your editor seems like a good move. I had no idea about the DesignSurfaceExt, that's pretty neat.

 

MaxIDE, or any IDE tool I've used is fine for very simple interfaces but as soon as you need to create anything really useful it becomes more convoluted than a Hideo Kojima storyline. Talk about messy.

 

I've always avoided CEGUI just because of the editor and the difficulty of creating new themes. It's always been easier and faster to roll my own interface than try and make something with that one.

 

I should think using the kind of designer you're working on would be familiar to everyone using it. So good luck to you it sounds like a great idea.

 

Thanks!

 

I decided to finally commit to using CEGUI for a project because I've always used the whole roll your own approach. However, after all these years, I still don't have something to reuse or anything of any worth to myself or others. CEGUI has a lot of gripes and I'm not ecstatic about it as a library, but I've come to the realization that my development practice of always wanting to roll my own components has led me to where I am today in regards to game development: nowhere. I do enjoy the educational experiences of learning how things work myself though.

 

I figure if I take the time to just learn CEGUI, it's going to take me one step closer to my goals. I'll end up reusing it over and over in all my future projects as well, so I think it will pay off as an investment. I'll be able to join other projects as well and bring that experience to the table with something to show for, for once.

 

Some people can make it work the other way, but I've learned about myself that I can't. I'd like to think I can and I want to, but I'm fooling myself. I simply need to pick something worthwhile to invest in and stick with it until I finish a project. Otherwise, I'm going to never get anything done! I guess that's why I fell in love with the Leadwerks engine. It's easy to use, the API design is my type of design, and it can produce results if you are willing to work for it. There is no reason why I should fail my next project with these tools at hand.

 

Anyways, hopefully the tool will be good enough to get a few people to at least want to try it out. I'm adding more stuff as we speak and it's going well. Even though it's what I expected from using .Net, I'm still amazed at the productivity that is possible with it. I mean it's like I just have to think of what I want and implementing it is only a matter of minutes and some Google searching to get it implemented. I really enjoy it.

 

Sounds great. I've never tried the official CEGUI Layout Editor but I'll take your word for it. Sounds like this would be a really useful tool.

 

I used to use Borland C++ Builder 6 years ago and that was a really Rapid Application Development system and great for building tools.

 

*High Five*! I actually started out learning a lot of RAD in C++ via Borland C++ Builder (3.0) as well. I guess it's not that long ago, but it would have been about 8-10 years ago. It certainly seems like a lot longer than that though. It was a lot of fun. I never got into much VB programming though, so I never had that to mess with. I remember trying to use Visual C++ 1.0 and it was just all over my head at the time.

 

I had wanted to work on a C++ IDE that would make programming a lot faster (in theory) through the use of snippets. The idea was to click buttons and fill out different parts of control structures, like for, while, etc... I didn't ever get too far with it and it wasn't a well through out idea, but it seemed like fun at the time. I did a bit of other stuff with BCB in my spare time, but I think I lost all that work over the years. In high school, we were using Turbo C++ (DOS version) during that time.

 

Anyways, I'll stop with the nostalgia for now. :unsure:

Link to comment

Yeah, that does bring back memories. I still have my boxed copy of Visual C++ 1.0 with its full set of manuals. Three proper printed manuals from what I remember, it's not seen light of day for a long long time :) Those were the days when you got more than just a CD for your money! I actually started off with Turbo Basic which was completely written in Assembler and lightning fast for its day. C++ Builder 6 was nice though, the power of C++ language with a VB style IDE and design methology. All driven by Delphi under the hood. I still have the professional version which was bought for me by the people I was contracted to at the time. Unfortunately, the licences are non transferable so I can't use it commercially otherwise it would still be my tool of choice.

Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...