Ejemplo n.º 1
0
        public void QuitGame()
        {
            // setup message box arguments
            var args = new MessageBox.MessageBoxArgs();

            args.callback = OnMessageBox;

            // get localized text
            args.messageText = Localization.Instance.Get("MessageBox_QuitGame");
            args.yesText     = Localization.Instance.Get("OK");
            args.noText      = Localization.Instance.Get("Cancel");

            // open message box
            MessageBox.Instance.Open(args);
        }
Ejemplo n.º 2
0
        public void BuyItem(ShopItem item)
        {
            // setup message box arguments
            var args = new MessageBox.MessageBoxArgs();

            args.messageText = string.Format("Do you want to buy \"{0}\" for ${1:F2}?", item.Name, item.Price);
            args.callback    = OnMessageBox;
            args.yesText     = "Buy";
            args.noText      = "Cancel";

            // save current item
            pendingItem = item;

            // open message box and let the player to confirm purchase
            MessageBox.Instance.Open(args);
        }