PGD Home

P-156: Update 17: Text Input Part 2

by on Apr.05, 2015, under Software and Games, Software Engines

Text input is now working. I couldn’t find an “easy” way of getting text input working, so I had to add a toggle to the game code, to detect whether the player is allowed to enter text. When the player is in a text input mode, the keyboard input from the letter and number keys is redirected to a callback function, and I use that to build up a string. I then listen for the return key, and when pressed, I perform processing on the string.

Since OpenGL is a graphics rendering library, and not a Games Engine, it has no native text input or output function, so this seems to be the best way of doing this for the moment.

 

Facebooktwitterredditpinterestlinkedinmail

Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!