/// <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(); } }
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); } }
/// <summary> /// A shortcut to trigger and deactivate the menu. /// </summary> /// <param name="manager"></param> public virtual void TriggerAndDeactivate(UIManager manager) { Trigger(); manager.Deactivate(); }