But apparently it is not as easy as utiliziing ActionSheet on iOS, and so far I haven’t had any success… So I’m wondering if there is a relatively painless way to implement a pop-up menu?
Hmm… it is just a “please rate the game if you like it” pop-up, and it has been done on iOS and WP8 without too much effort… Didn’t expect it could be this messy on Android…
Thanks @KonajuGames! But I want to provide a few buttons like “rate now”, “rate later” and “no thanks”. I don’t think a message box can contain buttons in it…
Now I get what you are looking for. You can use my Microsoft.Xna.Framework.Input.MessageBox.Show function instead of the old one suggested by @KonajuGames. It supports up to 3 buttons and it’s cross-platform. This is what happens under the hood:
Seems I can start a new task thread and use the return value of MessageBox.Show to decide what to do next:
var t = Task.Factory.StartNew( () => {
var buttonIndex = Microsoft.Xna.Framework.Input.MessageBox.Show(title, titleDescription, buttons);
CheckButtonIndex(buttonIndex.Result.Value);
return 0;
} );
If you are using async/await then: var result = await Microsoft.Xna.Framework.Input.MessageBox.Show(...);˙
otherwise: var result = Microsoft.Xna.Framework.Input.MessageBox.Show(...).Result;