Skip to main content
gamedev.net
🔒 Locked

Text input?

Started by jocke 0 replies 350+ views
Original Post
jocke
jocke
How do make the user enter text that echos on the screen with DirectInput? I''m writing a mapeditor and the user must be able to enter a filename when he/she saves/loads a map. Thanks.
Yoshi
Yoshi
Because you use DirectInput I assume that you are using DX7. You have two different choices. When you use buffered input just clear the buffer when you want the user to input something. Then when he finishes his input (button click or enter ,etc.) just read the buffer and store it into a string. When you use this way the user will not be able to see what he inputs. Or you use the non-buffered way. After each frame you look what keys are pressed insert them into a temporary buffer. This buffer you draw to the screen by either using your own text engine or DrawDebugText(very slow).
Hope this helped,
Yoshi
The last truth is that there is no magic(Feist)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.