Extensive GUI (Full Suite)

Started by
4 comments, last by Koshmaar 18 years, 9 months ago
Hello everybody, I challenge JavaCoolDude in the creation of the GUI that is easy to use/write extensions to, that is highly configurable and IS heavily documented in-source and help file by presenting to you my final creation: GUI Editor, Animation Editor, Help File and Full Source Try it and tell me what you think of it. Of course, it's far from perfect, although I did my best (note, not tried!) :) Here's a sample image of the GUI Editor: And here's one for the Animation Editor: Thanks all.
Advertisement
Quote:
I challenge JavaCoolDude in the creation of the GUI that is easy to use/write extensions to, that is highly configurable and IS heavily documented in-source and help file by presenting to you my final creation:


Man, it looks that GUI-programming has become hot topic nowadays, since I'm also going to create my GUI engine :-) Do you remember that?



Looking at your editor screens, it looks that I'll get some serious competitors ;-)

---------

Some questions about your GUI:

1. Will it be cross-platform?

2. What API's and libraries are you planning to use? SDL? OpenGL? DirectX? or are you planning to go the abstraction way, providing bindings to some of them?

3. Your GUI editor looks good, but... are you using MFC or sth like? Obviously, it won't be portable to Linux etc..

4. Another question about GUI editor: what about user created controls? will they be supported by it? If so, in what way?

5. Are you loading your controls from XML file? If so, what about dynamic creation of controls? Ie. imagine server explorer, where you could list all players. Each player would have little button to the left of it, called "Talk" - and you wouldn't know the exact number of players, they would be created dynamically, and so should be buttons...


I have plenty of other questions, but I'll give you time to answer those first :-)
Looking at your editor screens, it looks that I'll get some serious competitors ;-)

---------

Some questions about your GUI:

QUESTION: Will it be cross-platform?

ANSWER: Yes, it will, as soon as I get my hands on and install Linux on my machine. Maybe by that time my editor will be in wxWidgets, not MFC.

QUESTION: What API's and libraries are you planning to use? SDL? OpenGL? DirectX? or are you planning to go the abstraction way, providing bindings to some of them?

ANSWER: I'm already using OpenGL, but I'm planning on making it API-independant (pretty hot topic these days :) ). And I'm using the FreeImage to load textures and I'm planning on keep using it, because it loads a multitude of different textures and I believe it's cross-platform.

QUESTION: Your GUI editor looks good, but... are you using MFC or sth like? Obviously, it won't be portable to Linux etc..

ANSWER: I am using MFC, but I'll move into wxWidgets ASAP to provide cross-compartibility when I decide to make entire code cross-platform.

QUESTION: Another question about GUI editor: what about user created controls? will they be supported by it? If so, in what way?

ANSWER: User controls are obviously supported. You just have to write an extension class and provide your extra functions for saving/loading (if there are any extra attributes that you have in the class that needs saving) and also
overload any other virtual functions for extra functionality. Basically, all the controls in my GUI are user-based, because they inherit from derived classes and use their functionalities to a full extend - for example, see code for CGUIRadioGroup and the derived CGUITabControl.

QUESTION: Are you loading your controls from XML file? If so, what about dynamic creation of controls? Ie. imagine server explorer, where you could list all players. Each player would have little button to the left of it, called "Talk" - and you wouldn't know the exact number of players, they would be created dynamically, and so should be buttons...

ANSWER: Of course! That's my plan from the very beginning. Even now in GUI editor you add all controls purely with calling loading functions when you create new control:
CGUIButton *pButton = new CGUIButton;if(pButton->LoadXML(NULL, "my_button.xml"))   return true;

That's basically how you add a control. So, the only thing for chat creator will be is to track how many chatters are there, and allocate/deallocate buttons and all other controls for them on the fly.

I have plenty of other questions, but I'll give you time to answer those first :-)


There you go. Next!! :)
Ok, now questions are going to be a little harder... ;-)




ANSWER: Of course! That's my plan from the very beginning. Even now in GUI editor you add all controls purely with calling loading functions when you create new control:

CGUIButton *pButton = new CGUIButton;if(pButton->LoadXML(NULL, "my_button.xml"))   return true;


That's basically how you add a control. So, the only thing for chat creator will be is to track how many chatters are there, and allocate/deallocate buttons and all other controls for them on the fly.



Hmmmm, I have three questions to above code:

1. Do you have to manualy create all controls, not only those created dynamically? Ie., that would render some benefits from using text files useless, since I'd have to duplicate hierarchy both in code, and in xmls.

2. After creating such control, do you have to connect pButton to some kind of GUI manager/engine, or: such connecting is done automatically / it isn't needed?

3. It looks (consider "my_button.xml") that all controls are loaded from separate xml files. If so, then how are you managing hierarchy? Can I load bunch o controls from one xml file, using one function, and be happy, because everything else would be done automagically? Ie., window would be parent of buttons. Do you have to bind them manually?


Other questions:

1. Let's say that I don't want to give my users ability to play with .xml files that describe GUI, and I want to load those GUI's from ie. zip file. Are you planning adding custom plugins for loading UI?

2. It looks that buttons in your editor are rendered using single texture. What, if I want my buttons to be rendered "procedurally", ie. by rendering single gray quad beneath, and text over it? Can I pass some kind of plugin, pointer to function or sth like, to individual controls, so that my rendering code will be used? I don't want to derive new control for each way my buttons will be rendered :-) Also, can I use subclassing?

3. That's easy - how do you pass messages around, between controls? Pointers to functions, delegates, signals/slots etc.? What about handlers, what will happen when button is clicked, and I want to do sth?


That's all I could come up by now :-)
Just wanted to chime in and say that all three GUI Projects look awesome, and I wish you all good luck.

I wish Gamedev had a collection of user projects where good, usable projects could be searched in an intuitive manner. I'm pretty sure I will have forgotten about this thread long before I will need a GUI, unfortunately :(
Uberapan3: here's such collection: clicky, you can always find a link to it in this thread, on Alternative Game Libraries forum.


Btw, if anyone interested, HellRiZZer answered me those questions three (or five, uhmm, nevermind) in Graphics Programming and Theory forum.

This topic is closed to new replies.

Advertisement