MegaGlest Forum

MegaGlest => MegaGlest => Topic started by: softcoder on 9 February 2014, 07:55:37

Title: CE-GUI branch: feature/ce-gui
Post by: softcoder on 9 February 2014, 07:55:37
I've started work on looking at replacing our UI with CE-GUI. So far its working out fairly easy, I was able to add this dialog box on the main menu in one day and its fully clickable, resizeable and dragable!

(http://soft-haus.com/glest/pictures/screenshot-cegui1.png)

Whats great about CE-GUI is you can create themes via XML files and they even have a GUI editor. It was quite easy to integrate thus far.
Title: Re: CE-GUI branch: feature/ce-gui
Post by: Julius on 9 February 2014, 10:43:10
That will be a big improvement to the look of MegaGlest!

I would suggest the use of this theme: http://cegui.org.uk/forum/viewtopic.php?f=9&t=6679
Title: Re: CE-GUI branch: feature/ce-gui
Post by: tomreyn on 9 February 2014, 10:52:10
Looks like a good theme!

And at least so far, with just the one window without text displayed as in the screen shot above, FPS is not impacted at all for me, neither in menus nor in-game.
Title: Re: CE-GUI branch: feature/ce-gui
Post by: softcoder on 9 February 2014, 17:16:12
Yes its a great theme, theres what it looks like:

To see this in git add this to glestuser.ini:

Code: [Select]
CEGUI-Theme-Path=$APPLICATIONPATH/../../data/glest_game/data/cegui/themes/glossyserpent.1.0.7/cegui/
CEGUI-Theme-Name=GlossySerpent
CEGUI-Theme-Name-Cursors=GlossySerpentCursors

(http://soft-haus.com/glest/pictures/screenshot-cegui2.png)

To see some of what is possible in ce-gui check out: http://cegui.org.uk/ (http://cegui.org.uk/)
Title: Re: CE-GUI branch: feature/ce-gui
Post by: titi on 9 February 2014, 23:59:31
Thats nice I bet we will find some interested MG-artists soon who make our own theme too :-) .
Title: Re: CE-GUI branch: feature/ce-gui
Post by: softcoder on 10 February 2014, 00:19:08
Notice how 'clear' the font rendering is. This will likely solve the problem we had with our previous rendering of fonts showing blurry. You can really see the difference in the screenshot above.
Title: Re: CE-GUI branch: feature/ce-gui
Post by: tomreyn on 10 February 2014, 07:36:27
I did notice this immediately. :) Also the text is now brighter, proper white (which I think it was supposed to be before, too).

Hopefully we won't loose the UTF-16/multi-byte/RTL capabilities this way, though?
Title: Re: CE-GUI branch: feature/ce-gui
Post by: softcoder on 10 February 2014, 07:54:37
According to their website they offer full support. We should lose nothing. Checkout out their videos on the website i mentioned above. There are lots of demos of the widgets and how they work.

The editor to make themes etc (you can build menus, assign fonts, mouse pointer etc..) is called CEED and reference on the cegui website. It is python based.
Title: Re: CE-GUI branch: feature/ce-gui
Post by: titi on 10 February 2014, 10:07:47
Just so we don't forget it: CE-GUI is Mit License so we must add the license text  in our docs section too.
Title: Re: CE-GUI branch: feature/ce-gui
Post by: softcoder on 13 February 2014, 03:58:06
Here is a screenshot of the main menu UI redone in CEGUI.

Using CE-GUI takes care of word wrapping in message boxes, adds scrollbars when the text is too large to fit the view area, ensures you cannot click under the messagebox on buttons below, allows you to drag the dialog around out of the way.

(http://soft-haus.com/glest/pictures/screenshot-cegui3.png)

Using CEED (the CEGUI designer): (Help guide for how to use Ceed is here: http://static.cegui.org.uk/docs/ceed-snapshot11/user-manual.pdf (http://static.cegui.org.uk/docs/ceed-snapshot11/user-manual.pdf))

Furthermore, text can use format tags to do all kinds of things: http://cegui.org.uk/wiki/Formatting_Tags_in_CEGUI (http://cegui.org.uk/wiki/Formatting_Tags_in_CEGUI)

(http://soft-haus.com/glest/pictures/ceed1.png)
Title: Re: CE-GUI branch: feature/ce-gui
Post by: GunChleoc on 13 February 2014, 15:24:04
Using CE-GUI takes care of word wrapping in message boxes, adds scrollbars when the text is too large to fit the view area, ensures you cannot click under the messagebox on buttons below, allows you to drag the dialog around out of the way.
This is excellent news :)
Title: Re: CE-GUI branch: feature/ce-gui
Post by: Julius on 13 February 2014, 17:48:16
That looks excellent! Now on to the in-game HUD which is quite horrible in the old version :p
Title: Re: CE-GUI branch: feature/ce-gui
Post by: Coldfusionstorm on 14 February 2014, 00:55:52
Huraaay i can do it too :D.

(http://i.imgur.com/QrC9bUV.png)

Now to understand the schema and and other configuration files that makes it possible.

:/.
Title: Re: CE-GUI branch: feature/ce-gui
Post by: softcoder on 18 February 2014, 07:43:45
Here's another look at the misc tab of Options Screen using CEGUI: (ignore the stuff behind. its the old UI that has not been removed). **NOTE the language combobox shows each language in its native font!

(http://soft-haus.com/glest/pictures/screenshot-cegui4.png)
Title: Re: CE-GUI branch: feature/ce-gui
Post by: softcoder on 18 February 2014, 07:45:08
Here's another look at the misc tab of Options Screen using CEGUI: (ignore the stuff behind. its the old UI that has not been removed). **NOTE the language combobox shows each language in its native font!

(http://soft-haus.com/glest/pictures/screenshot-cegui4.png)
Title: Re: CE-GUI branch: feature/ce-gui
Post by: GunChleoc on 18 February 2014, 08:14:03
Nice - taghta! :D
Title: Re: CE-GUI branch: feature/ce-gui
Post by: titi on 18 February 2014, 13:44:57
Looking at the screenshots I see the old dialogs in background too ( you mentioned it too ).
I am a bit concerned about how the code will look like in the end if the old stuff stays in place. I think its better if you really remove the old stuff so we only get the new proper things. Even if some things might get accidently lost by this, it gives us a much more proper start using ce-gui. So don't hesistate, remove old stuff in the menus :) .
Title: Re: CE-GUI branch: feature/ce-gui
Post by: tomreyn on 18 February 2014, 15:06:58
I agree - we can always run 3.9.1 or even the develop branch next to it to compare.
Title: Re: CE-GUI branch: feature/ce-gui
Post by: softcoder on 18 February 2014, 18:12:33
I left the old stuff only until i am finished replacing the code, as i did in the main menu ALL old code goes away when i am done (don't worry about that) :)
Title: Re: CE-GUI branch: feature/ce-gui
Post by: titi_son on 18 February 2014, 19:43:45
Do we have sliders?
Because we could use them for the camera move speed for example.

The new UI looks really great.  :D
Title: Re: CE-GUI branch: feature/ce-gui
Post by: kratos on 18 February 2014, 20:06:01
It's a good idea, but maybe you can adjust esteticly the CE-GUI.
Title: Re: CE-GUI branch: feature/ce-gui
Post by: Julius on 1 July 2014, 17:47:44
Got it running for the in-game HUD also by now?
Title: Re: CE-GUI branch: feature/ce-gui
Post by: softcoder on 1 July 2014, 19:41:29
Not yet, had many distractions for MegaGlest but I have in recent weeks been continuing on this work.
Title: Re: CE-GUI branch: feature/ce-gui
Post by: kagu on 26 August 2014, 11:56:28
I have to admit , from the day that I saw that this is coming , I'm longing for it.
Title: Re: CE-GUI branch: feature/ce-gui
Post by: jammyjamjamman on 26 August 2014, 13:34:16
Actually, I was wondering with this new feature would it be possible to store new themes in the mod centre? It would be quite nice if the MG-user had an easy-to-add selection of themes to choose from that are created by the community
Title: Re: CE-GUI branch: feature/ce-gui
Post by: Ishmaru on 26 August 2014, 23:41:45
Actually, I was wondering with this new feature would it be possible to store new themes in the mod centre? It would be quite nice if the MG-user had an easy-to-add selection of themes to choose from that are created by the community :o)

I like the idea, but worried there wouldn't be much custom GUI development.

Also will combo boxes be implemented for map, faction, tileset and techtree selections?
Title: Re: CE-GUI branch: feature/ce-gui
Post by: tomreyn on 27 August 2014, 13:40:41
Actually, I was wondering with this new feature would it be possible to store new themes in the mod centre? It would be quite nice if the MG-user had an easy-to-add selection of themes to choose from that are created by the community :o )

I like the idea, but worried there wouldn't be much custom GUI development.

I know little about CEGUI, but my understanding so far is that anything GUI logic related is 'baked into' the builds you produce, and the set of looks to select from is limited by the amount of themes which come with your build. It may not be necessary to rebuild to allow for team switching, actually Softcoder had added an INI option (for testing purposes) to allow for theme selection, so at least by restarting the game theme switching may be possible.

However, for now, we really need to focus on getting any one of the CEGUI looks (and Softcoder actually came up with a really good one IMO) working throughout the game. Since this involves programmatic changes it rules out many of us - but by no means all of us - who contributed to MG so far.

Quote
Also will combo boxes be implemented for map, faction, tileset and techtree selections?

Everyone else can learn to use CEED, the CEGUI presentation editor (read: easy enough to use, kind of like a WYSIWYG (https://en.wikipedia.org/wiki/WYSIWYG) editor) and improve the menus and screens which have already been converted to CEGUI. I assume this will also allow for replacing existing UI elements by alternatives which use different input styles. As long as there are no logical changes and CEGUI supports it out of the box, it should be straight-forward.

The CEGUI branch of the megaglest-source repository provides a 'newly' added script which will build the CEGUI framework and the CEED editor on Linux (only, I don't know how to do it on Windows).
Code: [Select]
cd source/external-deps/cegui-source
./build-ce-gui-for-mg.sh
After building it, you also need to build MG itself, which will reuse parts of this earlier build.

The current code produces drop-down boxes on the custom game menu. Trying to change them to combo boxes seems like a good first objective in getting to know CEED. Give it a try!
Title: Re: CE-GUI branch: feature/ce-gui
Post by: jammyjamjamman on 27 August 2014, 23:46:36
Actually, I was wondering with this new feature would it be possible to store new themes in the mod centre? It would be quite nice if the MG-user had an easy-to-add selection of themes to choose from that are created by the community :o )

I like the idea, but worried there wouldn't be much custom GUI development.

I know little about CEGUI, but my understanding so far is that anything GUI logic related is 'baked into' the builds you produce, and the set of looks to select from is limited by the amount of themes which come with your build. It may not be necessary to rebuild to allow for team switching, actually Softcoder had added an INI option (for testing purposes) to allow for theme selection, so at least by restarting the game theme switching may be possible.

However, for now, we really need to focus on getting any one of the CEGUI looks (and Softcoder actually came up with a really good one IMO) working throughout the game. Since this involves programmatic changes it rules out many of us - but by no means all of us - who contributed to MG so far.

Quote
Also will combo boxes be implemented for map, faction, tileset and techtree selections?

Everyone else can learn to use CEED, the CEGUI presentation editor (read: easy enough to use, kind of like a WYSIWYG (https://en.wikipedia.org/wiki/WYSIWYG) editor) and improve the menus and screens which have already been converted to CEGUI. I assume this will also allow for replacing existing UI elements by alternatives which use different input styles. As long as there are no logical changes and CEGUI supports it out of the box, it should be straight-forward.

The CEGUI branch of the megaglest-source repository provides a 'newly' added script which will build the CEGUI framework and the CEED editor on Linux (only, I don't know how to do it on Windows).
Code: [Select]
cd source/external-deps/cegui-source
./build-ce-gui-for-mg.sh
After building it, you also need to build MG itself, which will reuse parts of this earlier build.

The current code produces drop-down boxes on the custom game menu. Trying to change them to combo boxes seems like a good first objective in getting to know CEED. Give it a try!

Well, it's nice to know that there may be possible way of adding custom themes, but yes I totally agree that there should be a focus on making one particular theme a replacement for the current setup.

Even if there wouldn't be much custom gui development around, I still think it'd be nice having the option available. But I must also admit, I only briefly looked at this topic and thought oh-pretty-graphical-program-for-easily-making-new-GUI's, I've never actually looked/ read/ thought deeply into how these kind of guis are developed  :P

Title: Re: CE-GUI branch: feature/ce-gui
Post by: kagu on 9 November 2014, 12:01:29
I heard the CEGUI has some problems, what about http://mygui.info , is that an viable alternative. I saw some games like stuntrally etc , have it, and it looks fast , stable and feature rich.
Title: Re: CE-GUI branch: feature/ce-gui
Post by: softcoder on 30 November 2014, 07:17:27
CEGUI is nice but some bugs that we encountered made me put a halt for now on that branch. I mentioned some of the problems in the irc channel for cegui, but i had no time to create defect tickets.

For now I will focus on releasing what we have related to other changes and not this stuff.