I'm trying to create a custom popup in xna that displays some text and adds the choice to select yes
or no
. Depending on the button selected, a value should be returned. I have everything pretty much set up, but I can't figure out how to do this particular part.
First, I have a PopupDialogHandler
class which holds a list of all the Popup_Dialog
's and manages their respective click
event and also manages updates and drawing.
The class Popup_Dialog
is the class that manages creating a new popup
object.
Everything is done, I draw the rectangle, draw the text, the button's are being handled, but I don't know what way should I use for a simple, yet effective result management.
Something like winforms' MessageBox.Show
that returns.
Currently, I create Popup_Dialog
object and add it to the list in PopupDialogHandler
class, from there I loop through all the items in the list and do the drawing and updating logic