Jump to content

deleting gui text input.


Gonan
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...