After a close inspection of several GUI projects, I finally set out to create my own managed GUI library. There are some really cool ideas in the libraries out there. My design goals for this project will be:
- Independence from Renderer - Just like in CeGui, it should be easily possible to switch from the XNA GraphicsDevice to a Tao.OpenGL Context.
- Usable with a GamePad - The library should allow you to construct GUIs that can be controlled using a gamepad.
- Themeing - It should be possible to change the look and feel of the GUI in an easy way.
- Easy control creation - Creating new controls should be as simple as possible. Some existing GUI libraries place the burden of handling graphics device resets on the control developers.
- Multiple desktops - You should be able to run multiple GUIs at the same time in order to support ingame computers like seen in DooM3 for example.
- Avoid messaging system - Do not use messages for propagating input events to the controls (bad design: creates garbage and decreases debuggability)
- Performance - Batch vertices and optimize texture usage so the GUI can handle large numbers of controls and texts.
This is not the first GUI I'm writing, I've done a similar system before in C++ which can be seen in the Nuclex Engine Demo I posted some time ago when I released the sources to my Nuclex Engine.
Messaging?
I'm afraid I don't understand the "avoiding messaging". What do you mean by this and what are the options in this respect?
I'm very intersted to see this, having recently embarked on an interface in XNA. Its become a trick to me to link events (mouse clicks, et. al.) with actions and code.
I'll be looking forward to learning from someone who's been there before. :)
Systems that Propagate Messages
Most GUI systems are centered around message objects. For example, when the user presses a key, a message with the keycode is generated and handed to the topmost control. This control can then either process the message or hand it over to its active child control, and so on. That's what I meant with messaging system.
The problems with this approach are:
That's why I'm avoiding such messaging systems like the plague :)
Post new comment