SplitScreen-Me / splitscreenme-nucleus

Nucleus Co-op is an application that starts multiple instances of a game for split-screen multiplayer gaming!
https://www.splitscreen.me/docs/what-is-splitscreen-me
GNU General Public License v3.0
856 stars 50 forks source link

Add placeholder text for Game.Options #17

Closed Snailedlt closed 8 months ago

Snailedlt commented 2 years ago

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

Mikou27 commented 8 months ago

https://github.com/SplitScreen-Me/splitscreenme-nucleus/pull/61