Sign in to follow this  
nomonkeybusiness

GUI for games

Recommended Posts

Hi! I'm currently working on a project which is about two years old. The game is a turn-based strategygame, and that means a lot of gui. The GUI is up for redecoration and I've gotten responsibility to make the system versatile. We are using CEGUI. I just don't know where to begin. My lead programmer has fronted a wish for a gui-editor, which would make the process of actually creating the gui painless, and make sure that the coders can work with code, not designing gui. I've looked at the CELayoutEditor, but I can't really make any sense out of it. The program seems unwilling to obey my commands. I can't even load a image into it. I could probably work it out, but I seriously doubt that a graphical artist could. Does anybody have any tips or alternate solutions? I would like to know how it works in the industry. Is it recommended to connect the buttons to extern scriptfiles via the editor, or should I hardcode all the button's functions? Or should we simply fuck the gui-editors and just hard-code everything? Up until now, we have initialized the gui-elements as soon as the gamestate changes, like this:
MainMenuState::InitState()
{
   button* startGameBtn = CreateButton();
   image* BgImg = CreateImage();
   // And so on..
}
But it seems bad to be forced to recompile everything, just because we move some button a couple of pixels. And the biggest drawback is that I have to polish the gui, until the designer is happy. I've allready worked that way in another project and it is really a pain. It would be much better if the designer or some artist could take care of it.

Share this post


Link to post
Share on other sites
Short answer: it's ok for your code to specify which widgets you want, and then for data to dictate where they are. That could be as simple as a file containing a list of widget names followed by x, y, width, and height values.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this