Skip to main content
gamedev.net
🔒 Locked

GUI Text Box Implementation

Started by robirt 0 replies 200+ views
Original Post
robirt
robirt
The only part of this i need help with is the input. Should i actually write a thing like if ''b'' is pressed add b to the end of the string and do that for each letter, or is there a better and easier way to just automatically copy whatever the person types to the end of the string?
Rodger
keethrus
keethrus
well, you could just take whatever was pushed and add it to the end of the string. you could also add in some filter to only allow certain characters to be added (like alphanumeric or whatever).

i wouldnt do an if statement for each and every possible character, you could greatly simplify it. ex:

if ( pushedChar > ''A'' && pushedChar < ''Z'' )
{
// put ''pushedChar'' at end of string
}


hope this helps some.

- jeremiah

inlovewithGod.com

Topic Locked

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

Sign in to reply to this topic.