Jump to content
  • Advertisement
Sign in to follow this  
f4nt

User Input - DirectX

This topic is 4420 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

Alright, I've googled to my hearts little content, but I haven't found a good solution to my problem. I'm working on a high score table for a project of mine, and everything is going pretty good (all things considered). I'm working with DirectX, and I have everything laid out perfectly how I want it for the scoreboard. The only problem I can't seem to figure out is how to allow the user to input text. I might assume that something cheap like cin >> may work, but I have my doubts. Even if such a silly thing did work, the user wouldn't be able to see what they're entering. If the user can't input text, the scores will be meaningless since they won't have a name attatched to them. If anyone can point me towards a good article on such an idea, or point me in the right direction that would be awesome. I've just hit a brick wall with this until then though. I'd really rather not have to code like some giant switch statement to catch every keystroke, and turn that into text if I don't have to lol. Thanks for any help you can give me!

Share this post


Link to post
Share on other sites
Advertisement
(SDK root)\Samples\C++\Direct3D\CustomUI

Class -- CDXUTEditBox

The SDK has this example of an edit control. Otherwise you could roll your own by creating a caret and placing each key event into a buffer.

I am not sure if this is what you meant.

Share this post


Link to post
Share on other sites
You might want to use windows callback protocol to give you the current pressed key.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!