Ejemplo n.º 1
0
 void PopUpResult(PopUpResultEventArgs e)
 {
     if (e.SelectedOption == 1)
     {
         DialogResult = DialogResult.A;
     }
     else
     {
         DialogResult = DialogResult.Nothing;
     }
 }
Ejemplo n.º 2
0
 public virtual void Close(GameTime gameTime)
 {
     PopUpResultEventArgs result = new PopUpResultEventArgs();
     result.GameTime = gameTime;
     result.Result = DialogResult;
     result.SelectedOption = SelectedOption;
     if (PopUpCallback != null)
     {
         PopUpCallback(result);
     }
     Shorewood.popUpManager.CloseDialog(gameTime);
 }
Ejemplo n.º 3
0
 protected override void OnSelect(object sender, IETGames.Shorewood.Input.ButtonFireEventArgs a)
 {
     if (!a.previouslyDown)
     {
         DialogResult = DialogResult.A;
         PopUpResultEventArgs p = new PopUpResultEventArgs();
         p.SelectedOption = SelectedOption;
         p.Result = DialogResult;
         p.GameTime = a.gameTime;
         Shorewood.OnPurchase(p);
         Close(a.gameTime);
     }
     base.OnSelect(sender, a);
 }
Ejemplo n.º 4
0
 private void OnFailedPurchaseResolved(PopUpResultEventArgs a)
 {
     gameState = previousGameState;
 }
Ejemplo n.º 5
0
 void ControllerDisconnectResolved(PopUpResultEventArgs e)
 {
     if (previousGameState != GameState.PlayingNormalGameplay)
     {
         gameState = previousGameState;
     }
 }
Ejemplo n.º 6
0
 public static void OnPurchase(PopUpResultEventArgs a)
 {
     if (a.Result == DialogResult.A)
     {
         if (a.SelectedOption == 1)
         {
             if (Gamer.SignedInGamers[Shorewood.mainPlayer].Privileges.AllowPurchaseContent)
             {
                 try
                 {
                     Shorewood.cheer.Play();
                     Guide.ShowMarketplace(Shorewood.mainPlayer);
                 }
                 catch (GuideAlreadyVisibleException)
                 {
                 }
             }
             else
             {
                 //TransitionTo(PopUpType.CannotPurchase, a.GameTime);
                 previousGameState = gameState;
                 gameState = GameState.FailedPurchase;
             }
         }
     }
 }
Ejemplo n.º 7
0
 private void ShutDownPopUpResult(PopUpResultEventArgs result)
 {
     if (result.Result == DialogResult.A)
     {
         if (result.SelectedOption == 1)
         {
             dialogManager.CloseDialog(result.GameTime);
             Shorewood.gameState = GameState.ShutDown;
             dialogManager.ActiveDialog.DialogResult = DialogResult.Nothing;
         }
     }
 }