SplitScreen-Me/splitscreenme-nucleus

Add placeholder text for Game.Options

Snailedlt opened this issue · 1 comments

This is related to issue #16

Sometimes, when you have a text field in Game.Options, you want to give a hint to the user as to what are valid inputs. In these cases it would be nice to have a little placeholder text to show a hint as to what they should input.

HTML has this exact feature, and it's widely used for forms where users input stuff like username, phone numbers, emails, etc... to show the user what the text should look like.

Here's an example: https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_placeholder

Notice the greyed out text:
image

Once you start writing the text disappears:
image

and if you submit with just the placeholder text, nothing should be sent:
image

Here's a little code snippet I found for implementing this in Winforms:
https://stackoverflow.com/a/21439310/12206312