Adam Dawes
Adam Dawes

Reputation: 198

Entering text in Windows 8 in C#/MonoGame app

I'm writing a WinRT game for Windows 8, in C#, using the excellent MonoGame. I've reached the part where the user has achieved a high score and needs to enter their name. This is causing me more pain than I'd anticipated so I thought I'd ask for help.

If neither of these are possible, I guess I'll have to wire this all up myself... I then would plan to intercept keystrokes and display the required text on screen myself. As I don't have a physical tablet (just the simulator) I'm struggling to start with this. How can I:

Some of these sound like they should be easy to answer, but I've yet to track down answers to any of them.

Many thanks!

Adam.

Upvotes: 5

Views: 1510

Answers (2)

Bob Familiar
Bob Familiar

Reputation: 116

This is not a cross platform solution but you could use a FlyOut and place the controls for data entry on the window. FlyOut guidelines are here and UI Controls for text input guidelines are here. I have also used MessageDialog in a MonoGame for asking the user simple questions (up to 3 options) or to get a Yes|No response. You can get details of that class here.

Upvotes: 2

kbo4sho88
kbo4sho88

Reputation: 175

Hey there is such a way to do this in monogame. There is a new template that allows you to create a XAML + Game game which allows you to use the game class you a used to with the xaml bits as well. These links should get you started. The monogame team rocks.

There are the three game types listed there. You want XAML + Game there is a template for it now if you get the proper version of monogame.

https://github.com/mono/MonoGame/wiki/Windows-8-Project-Types

let me know if you need more help

Upvotes: 4

Related Questions