Gonan Posted January 6, 2015 Share Posted January 6, 2015 So my first display screen is an empty map with a camera. On it I'm setting up the HUD, and giving some basic instructions using white text on black background. I prompt for the user to enter their initials, and press return to start. I display the initials as they hit each key A-Z. The problem I'm having though, is if the user keys the wrong initials, and presses delete or backspace, I need to blank out the initials that have been displayed with DrawText. The problem is the output on the display is cumulative. So displaying blanks over the initials changes nothing. So I thought, I know , Ill be really clever and use SetColor(0,0,0,1) to redraw the old initials in black before i clear them down. (I was implementing the backspace and delete key to completely reset all the initials typed in, not just the last key) Unfortunately the SetColor(0,0,0,1) just writes grey text on black, its better than nothing, but I was wondering how anyone else would black out the initials typed in error. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted January 6, 2015 Share Posted January 6, 2015 Rather than blanking out with color, why not alter the string that you want to display? The way I do is I store a boolean for when the backspace key pressed. Then depending on where the cursor is, I remove a letter from the string. Quote Link to comment Share on other sites More sharing options...
randomkeyhits Posted January 6, 2015 Share Posted January 6, 2015 I did a tutorial on a simple text input mechanism here it allows you to cursor left/right delete backspace or home/end Quote content over form, game play over all. Link to comment Share on other sites More sharing options...
Gonan Posted January 8, 2015 Author Share Posted January 8, 2015 Something happened with after yesterdays beta, the text displays on the empty map, have sharpened up and are no longer blocky, and the grey colour has gone for the deleted text, and is now black, so I guess its been fixed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.