Create input form in monogame

I am creating a simple ping pong game using monogame, is it possible to add windows form style input forms within monogame, i am looking to create a login/game lobby where players can type ip addresses, their name, and change game settings so that they can connect to a running game to play mulitplayer.

I have looked on google but cant seem to find much i am looking for something that can be done on the game screen so i dont have to switch over to a windows form to handle this and then switch back over to the game

If it’s just a simple PingPong game on windows and you don’t need fullscreen support, you could try to merge your game with WindowsForms using MonoGame.Forms.

It has MouseInput, KeyboardInput and GamePadInput support. You can also use RenderTargets if needed.

But you will then lose multi platform abbility.

You can also just use a GUI library like GeonBit.UI or NuklearSharp.

OR… If you don’t want to use any GUI library or other library, with a Keyboard and DrawString you can create a simple input class to prompt a user for login name. you have hust have to trap Numerics, Characters, Backspace and Spacebar and do the necessary adjustment to the input string and draw it using DrawString ^ _^ y

Just like that one here:

2 Likes