MegaGlest Forum
MegaGlest => MegaGlest => Topic started 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.
-
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
-
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.
-
Yes its a great theme, theres what it looks like:
To see this in git add this to glestuser.ini:
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/)
-
Thats nice I bet we will find some interested MG-artists soon who make our own theme too :-) .
-
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.
-
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?
-
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.
-
Just so we don't forget it: CE-GUI is Mit License so we must add the license text in our docs section too.
-
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)
-
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 :)
-
That looks excellent! Now on to the in-game HUD which is quite horrible in the old version :p
-
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.
:/.
-
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)
-
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)
-
Nice - taghta! :D
-
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 :) .
-
I agree - we can always run 3.9.1 or even the develop branch next to it to compare.
-
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) :)
-
Do we have sliders?
Because we could use them for the camera move speed for example.
The new UI looks really great. :D
-
It's a good idea, but maybe you can adjust esteticly the CE-GUI.
-
Got it running for the in-game HUD also by now?
-
Not yet, had many distractions for MegaGlest but I have in recent weeks been continuing on this work.
-
I have to admit , from the day that I saw that this is coming , I'm longing for it.
-
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
-
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?
-
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.
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).
cd source/external-deps/cegui-source
./build-ce-gui-for-mg.shAfter 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!
-
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.
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).
cd source/external-deps/cegui-source
./build-ce-gui-for-mg.shAfter 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
-
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.
-
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.