Exemple #1
0
 /// <summary>
 /// A shortcut to cancel and deactivate the menu.
 /// </summary>
 /// <param name="manager"></param>
 public virtual void CancelAndDeactivate(UIManager manager)
 {
     if (Cancelable)
     {
         manager.Deactivate();
         Cancel();
     }
 }
Exemple #2
0
        public override void HandleInput(UIManager manager) {
            base.HandleInput(manager);

            if (manager.Left.Pressed) {
                Counter.Decrement();
                ItemSwitched();
            }
            if (manager.Right.Pressed) {
                Counter.Increment();
                ItemSwitched();
            }
            if (manager.A.Pressed) {
                Trigger();
                manager.Deactivate();
            }
            if (manager.B.Pressed) {
                CancelAndDeactivate(manager);
            }
        }
Exemple #3
0
        public override void HandleInput(UIManager manager)
        {
            base.HandleInput(manager);

            if (manager.Left.Pressed)
            {
                Counter.Decrement();
                ItemSwitched();
            }
            if (manager.Right.Pressed)
            {
                Counter.Increment();
                ItemSwitched();
            }
            if (manager.A.Pressed)
            {
                Trigger();
                manager.Deactivate();
            }
            if (manager.B.Pressed)
            {
                CancelAndDeactivate(manager);
            }
        }
Exemple #4
0
 /// <summary>
 /// A shortcut to trigger and deactivate the menu.
 /// </summary>
 /// <param name="manager"></param>
 public virtual void TriggerAndDeactivate(UIManager manager)
 {
     Trigger();
     manager.Deactivate();
 }