Jump to content
  • Advertisement
Sign in to follow this  
Antonym

in-game GUI?

This topic is 3081 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need a general purpose textbox(which I've heard is hell to write) and buttons for a tetris I am working on. What are some common choices for in-game GUI libraries? Google hasn't been much help. I've heard some good things about Qt but it seems quite robust and I want to keep things simple.

The game is being developed in c++ with openGL and SFML.

Thanks.

Share this post


Link to post
Share on other sites
Advertisement
I am using Guichan which works quite well. There is also CEGui which you may find interesting.

Qt is not designed specifically for games, and is a bit heavy for what you want, in my opinion.

Share this post


Link to post
Share on other sites
Is the text box just for entering a name to label a high score?

A general purpose text box with word wrapping, selection, pop up scroll bars, etc., is indeed hard to write. But a single line text box for entering a user's name isn't really a big deal.

If you only need a single line text box widget and maybe a button widget, I'd say just write them yourself.

[Edited by - jwezorek on July 5, 2010 4:47:15 PM]

Share this post


Link to post
Share on other sites
Indeed, it's not so hard to write. If it only uses ASCII. I don't know how hard it would be to implement with ANSI or UNICODE, but I implemented ASCII text boxes several times. The simplest text box is very simple (no word warping, newline, text scroll, etc).
You have to implement a few things:

insert char into string (and of course "push" right the rest of the string).
remove char from string (and of course "push" left the rest of the string
Moving the caret: it heavily depends on the input method, but basically it's just incrementing/decrementing the caret value.

And that's basically it. you have to exclude unprintable characters, but that's easy with ASCII.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!