Author Topic: GUI Libraries  (Read 17413 times)

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: GUI Libraries
« Reply #25 on: 30 January 2009, 13:07:50 »
I agree. It's the same problem with libUFO and most other open source GUI libs, but I've managed to compile a CEGUI program so there may be hope for it yet.  ;D

Nice blog btw.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: GUI Libraries
« Reply #26 on: 31 January 2009, 11:02:18 »
CEGUI Must be at least quite good because I've seen some very nice samples in OGRE. It is better known and has a better community.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: GUI Libraries
« Reply #27 on: 12 February 2009, 06:23:32 »
As far as features goes it's not bad but the documentation is lacking (information often hidden in the forum) and has quite a lot of dependencies. It has been quite a pain to get working and there are still a few things to sort out.

The events are working now. So if you click on a button there can be code to respond.

Statically linking adds about 6MB to the exe (total about 9MB) and also need to include the DLLs for the dependencies.
 
New libs that need to be included for glest:
CEGUIBase_Static_d.lib
OpenGLGUIRenderer_Static_d.lib
CEGUIDevILImageCodec_Static_d.lib
CEGUIFalagardWRBase_Static_d.lib
CEGUITinyXMLParser_Static_d.lib
ILU.lib
ILUT.lib
DevIL.lib
pcre.lib
freetype.lib
winmm.lib

(NOTE: might be able to reduce the amount above if I link it in CEGUIBase??)

Additional DLLs:
ILU.dll
ILUT.dll
DevIL.dll
freetype6.dll

If we want lua support there will be more to add.

I've set up the data files like:
data/gui/fonts/
data/gui/layouts/
data/gui/skins/

maybe it could be without 'gui' folder



The buttons are loaded from an xml file.

Notice how the mouse cursors are in different places. That needs to be fixed. Keyboard input and timer injection need to be added. Then it should just be a matter of replacing the existing components and creating a Glest style skin. Also need to setup project files for Linux.

Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: GUI Libraries
« Reply #28 on: 28 March 2010, 00:33:41 »
Nice warning about being an old topic. I think this is the best place to post this though.

I was having a casual browse through libraries that can be used with Ogre3d and came across this really impressive GUI called MyGUI -- Features. I think it runs independently of Ogre3d. I'll look more into it when I get some more time but it could be a contender to CEGUI.  ;D
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

Fluffy203

  • Guest
Re: GUI Libraries
« Reply #29 on: 28 March 2010, 00:50:37 »
It has very good compatibility , so i would have to say a deff contender in deed  ;D

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: GUI Libraries
« Reply #30 on: 28 March 2010, 06:29:28 »
Looks promising,

Quote
- Fast RTTI for safe casts.
I take this to mean they maintain it themselves  :thumbup:

Code: [Select]
MyGUI::ButtonPtr button = mGUI->createWidget<MyGUI::Button>("Button", 10, 10, 300, 26, MyGUI::Align::Default, "Main");
Code: [Select]
MyGUI::ButtonPtr button = mGUI->findWidget<MyGUI::Button>("MyFirstButton");
I like this a whole lot more than CEGUI :thumbup:

It even has a signal/slot mechanism, and they call them delegates  :thumbup:

I've barely looked at it, but already I think I'd prefer this...
Glest Advanced Engine - Code Monkey

Timeline | Downloads

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: GUI Libraries
« Reply #31 on: 18 May 2010, 10:03:01 »
Another option...

Glest::Widgets

We 'roll our own'.  Martiño has provided us with the basics, I've wrapped up parts of it and created an object oriented framework for it all, incomplete as yet, but functional.

I also got sick of looking at those crappy bitmap fonts while I was doing this, so I've integrated FreeType, so we now have nice font rendering. [This also neatly removes the last problem in getting a Mac version out :thumbup:]

If we integrate PolitikerNeu's pixmap loaders from megaglest and do a bit more work on the widget system, then we'll have everything we need I think.

This is what the root menu now looks like on my working copy,


I doesn't support overlapping widgets within a container yet, but I will be moving on to the rest of the menus shortly and want proper combo boxes, which will require it, so I'll get that sorted soon.

Will get what I have cleaned up some more and commit it to a new branch this week sometime.  But for now I should stop this and find some water related bugs to squash :look:
Glest Advanced Engine - Code Monkey

Timeline | Downloads

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: GUI Libraries
« Reply #32 on: 18 May 2010, 11:08:17 »
I still think a 3rd party library will be better since it would have more features but if you want to improve the current system until that happens I'm not going to stop you.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

jda

  • Guest
Re: GUI Libraries
« Reply #33 on: 18 May 2010, 14:35:30 »
Will this still be compatible with menu-mods such as the Nihilirilian mod or the Malevolent Rise ChupaReaper is currently working on?
(ChupaReaper is doing his mod (looks very promising) specifically for gae...)

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: GUI Libraries
« Reply #34 on: 19 May 2010, 03:03:20 »
I still think a 3rd party library will be better since it would have more features ...

True, and as you're probably already aware, I have no qualms with writing lots of code and then throwing it all away, so I also don't mind it being replaced 8)  But, out of interest, what features do we really need?

While I agree that a 'third party' system would be nice, I'd prefer not to have more code that does the same thing as code we already have, added to the source tree or in static libs we're linking with.  One xml-parser, one set of pixmap loaders, one Xxxx.  Code bloat is a little bit of an issue already. As I mentioned, if we integrate PolitikerNeu's image loaders, we'll have virtually all the pieces, it will just be a matter of 'some assembly required'. (but no assembly language!)

Will this still be compatible with menu-mods such as the Nihilirilian mod or the Malevolent Rise ChupaReaper is currently working on?
(ChupaReaper is doing his mod (looks very promising) specifically for gae...)

Yes, The fonts will just be nicer :) I'll add an option so the 'advanced engine vX.x.x' label can be drawn smaller and below the logo texture, rather than over it (or, perhaps it makes more sense for that to be the default).
Glest Advanced Engine - Code Monkey

Timeline | Downloads

jda

  • Guest
Re: GUI Libraries
« Reply #35 on: 19 May 2010, 13:31:49 »
Good then. :)

On the 'advanced engine vx.x.x' font... the option for the position would be nice yes, but... that particular font doesn't really go along very well with the logo's one... Please change it or give the ability to change it, whatever. ;D

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: GUI Libraries
« Reply #36 on: 19 May 2010, 14:23:19 »
... but... that particular font doesn't really go along very well with the logo's one... Please change it or give the ability to change it, whatever. ;D

Yeah, I was just going crazy downloading and trying different free fonts, that was what it looked like yesterday. My better half criticised that particular font, and my use of too many different fonts, my working copy currently looks like this,



The font for the buttons I was happy with, good legibility (hard to find when looking for freely distributable ones...)
The 'Advanced Engine 0.3.0' font above is much better I think... but may change again yet :P The fonts for 'user interface elements' will be configurable, but I am thinking there will be one 'advanced engine' font just for those labels. Of course, it would just be a font file distributed with the game, so if you really wanted to change it, it wouldn't be hard :thumbup:

Glest Advanced Engine - Code Monkey

Timeline | Downloads

jda

  • Guest
Re: GUI Libraries
« Reply #37 on: 19 May 2010, 16:02:35 »
adv eng. font now  :thumbup:
buttons font agree  :thumbup:

Quote
The fonts for 'user interface elements' will be configurable
What do 'user interface elements' include? The buttons font? The inmatch UI and dialogs?  :|

Quote
I am thinking there will be one 'advanced engine' font just for those labels. Of course, it would just be a font file distributed with the game, so if you really wanted to change it, it wouldn't be hard Thumb Up
:thumbup:

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: GUI Libraries
« Reply #38 on: 21 May 2010, 16:46:34 »
Looks fantastic Silnarm and Hailstone.

Looking at an old picture with the GPL logo at the bottom though, I think that button shouldn't be there, since it isn't necessary (the only people who care enough about the license can find it in a second) and it doesn't match the glest theme.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: GUI Libraries
« Reply #39 on: 21 May 2010, 17:27:29 »
Looking at an old picture with the GPL logo at the bottom though, I think that button shouldn't be there, since it isn't necessary (the only people who care enough about the license can find it in a second) and it doesn't match the glest theme.
I think it might look pretty good if we just alpha'd out the red.

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: GUI Libraries
« Reply #40 on: 22 May 2010, 03:29:20 »
I still think a 3rd party library will be better since it would have more features ...

True, and as you're probably already aware, I have no qualms with writing lots of code and then throwing it all away, so I also don't mind it being replaced 8)  But, out of interest, what features do we really need?

I think the most important ones to add at the moment are tab, combo box and check box components. Others are: radio button, list with scroll bars, tooltips, movable windows, (maybe tree view, table, webpage view and menus). Also things like a delegates for events, font manager, cursor manager, layout manager and skinning system. Maybe lua bindings, clipboard and animation support.

"really need" depends on the gameplay and usability features we want to add but those are the additional things I would look for in a 3rd party GUI.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

Fluffy203

  • Guest
Re: GUI Libraries
« Reply #41 on: 22 May 2010, 06:40:42 »
I agree with you hail , i would love to be able to skin my gui for the game , that would deff personalize it more for me  :thumbup:

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: GUI Libraries
« Reply #42 on: 24 May 2010, 00:32:08 »
Looking at an old picture with the GPL logo at the bottom though, I think that button shouldn't be there, since it isn't necessary (the only people who care enough about the license can find it in a second) and it doesn't match the glest theme.

Well, I thought it looked alright on the somewhat 'bleak' background of the Glest menu, but I guess I'm making assumptions about the the 3D scene used for the menu... Maybe I'll move it to the intro, or the about screen.

I think it might look pretty good if we just alpha'd out the red.

That's another option, while I agree with Omega that probably no one really cares, I though it was a nice touch, will try a few things out...

I think the most important ones to add at the moment are tab, combo box and check box components. Others are: radio button, list with scroll bars, tooltips, movable windows, (maybe tree view, table, webpage view and menus).

My ComboBox is working now, it uses a ListBox widget when 'expanded', it doesn't have auto scroll-bars yet, but will shortly. Check boxes and radio buttons are just state buttons, I wasn't planning to support Tab pages, but I've added a layering system now, so they would be easy to do. Moveable windows will also be easy with layers. The tree-view is not likely, but a simple 'table' widget will be built for some of the menus, and definitely be used in BattleEnd.

What on earth do you want a web page view for ?!? 

Quote
Also things like a delegates for events, font manager, cursor manager, layout manager and skinning system. Maybe lua bindings, clipboard and animation support.

I'm using sigslot for Gui generated events, we will need code to enumerate system fonts on Windows/Linux/Mac, but I doubt that is something a Gui Library is going to do for you anyway. The rest I have no plans to add at this time, but certainly skinning and Lua bindings are on the radar.

Probably the biggest issue with my own system is that it's all old school immediate mode OpenGL... But who knows, it may be an opportunity to write some not to complicated Fragment Shader programs, probably a good route to introduce oneself to this whole shader language business...

Glest Advanced Engine - Code Monkey

Timeline | Downloads

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: GUI Libraries
« Reply #43 on: 24 May 2010, 01:56:43 »
Sounds good.

Quote from: silnarm
What on earth do you want a web page view for ?!? 
Display news from a website or the info for a unit and other information like help pages. It could be done with a link to open a webpage but I think it would be nicer integrated.

Quote from: silnarm
we will need code to enumerate system fonts on Windows/Linux/Mac,
What about using true type fonts and supplying the fonts ourselves?
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: GUI Libraries
« Reply #44 on: 24 May 2010, 03:39:48 »
Display ... the info for a unit and other information like help pages. It could be done with a link to open a webpage but I think it would be nicer integrated.
Oooh, I like!  That's one of the things I really liked about the "Age of" games, and I don't know if many modders would provide verbose descriptions for their units, but I can guarantee I would make use of this.  It adds so much to the storytelling aspect, for people like me who really enjoy the "fluff" more than/in addition to running around bashing things in the head until they die.  It would be nice if we could find a way to do it that would be substantially different, though.

zombiepirate

  • Guest
Re: GUI Libraries
« Reply #45 on: 24 May 2010, 04:02:29 »
When were you planning on committing this?

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: GUI Libraries
« Reply #46 on: 24 May 2010, 09:03:43 »
When were you planning on committing this?

Some time last week :P

I keep changing things, but I'll commit it in its current state tonight.  It uses virtual inheritance, I spent much of Saturday changing it to use decorators in attempt to remove the virtual inheritance, but the problems with the decorator pattern proved just as nasty, so I changed it back.  But now the virtual inheritance is annoying me again, so another attempt will probably be made :-\

Glest Advanced Engine - Code Monkey

Timeline | Downloads

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: GUI Libraries
« Reply #47 on: 24 May 2010, 10:18:26 »
I think GLGooey uses decorator pattern with composition. (or was it called descriptor something  :-\)

Code: [Select]
class ComboBox : public Window
{
...
private:
    ...

    ListBox* listBox_;
    ComboBoxMouseListener* comboBoxMouseListener_;
    ComboBoxDesc* renderDesc_;
    bool isDropDownOpen_;
};

class ComboBoxDesc : public RenderDesc
{
...

Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: GUI Libraries
« Reply #48 on: 24 May 2010, 13:01:49 »
What about using true type fonts and supplying the fonts ourselves?

Yeah, we should definitely find some nice ones and distribute them as the defaults, the one I was using for the buttons I'm not so sure about now, certain letters ('r' and 't' for example) are very skinny...

But it would be nice to let the user select the fonts they want to use, including system fonts.

... I'll commit it in its current state tonight...

Changes are in, I even took the time to reboot into linux and fix the inevitable build errors :)

I think GLGooey uses decorator pattern with composition. (or was it called descriptor something  :-\)

Might take a closer look at that, virtual inheritance is not nice, something is going to have to change before it grows to much further  :look:
Glest Advanced Engine - Code Monkey

Timeline | Downloads

Gabbe

  • Guest
Re: GUI Libraries
« Reply #49 on: 24 May 2010, 14:06:48 »
dafont.org

Awesome fonts, some free commercial, some free personal, some free for everyone :D

 

anything