Sign in to follow this  

Making a typeable for ingame name

Recommended Posts

BaneTrapper    1531
Currently i am working on "Turn based,2d Rpg" with c++ and sfml2.0 libs,
and i reach stage i got no idea how to manage.

After a user presses a "New Game" i move him intro a screen where he picks a character,
He needs to chose following:
2:Character type

Character type and stats i control with collision detection, but how do i manage the name input?
After he presses inside the "Type name here" box, i should turn on a special loop in "class that handles event"
anything that he types i push intro. And each loop i print what is in string intro the "Name box"

Is there a premade library for handling this kind of stuff for c++ or at sfml2.0?
If you read above, is it efficient or should i look intro it better?
How do i know when the user finished typing in his name, check if he clicks anywhere away from the "Type name here" box? tips please.

Share this post

Link to post
Share on other sites
BeerNutts    4400
There isn't anything premade in SFML to handle this, but there are some GUI's you can use.

In the SFML 1.6 tutorials, he shows how to [url=""]integrate SFML with QT[/url] (again, it's SFML 1.6, so API is slightly different).

Or you can look at some of the SFML GUI's available now, although in different states of completeness:

Good Luck!

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