public override void HandleInput(UIManager manager) { base.HandleInput(manager); if (CurrentState == State.Normal) { if (manager.A.Pressed) { CurrentState = State.WaitingForInput; } if (manager.B.Pressed) { TriggerAndDeactivate(manager); } } else { if (Input.Instance.KeyPressed(EscapeKey)) { CurrentState = State.Normal; } else if (Input.Instance.KeyPressed(Key.Any)) { ValueKey = Input.Instance.LastKey; CurrentState = State.Normal; } else if (Input.Instance.MouseButtonPressed(MouseButton.Any)) { } } }
public override void HandleInput(UIManager manager) { if (manager.Right.Pressed) { MenuGrid.X += 1; } if (manager.Left.Pressed) { MenuGrid.X -= 1; } if (manager.Down.Pressed) { MenuGrid.Y += 1; } if (manager.Up.Pressed) { MenuGrid.Y -= 1; } for (var i = 0; i < MenuItems.Count; i++) { if (MenuGrid == i) { MenuItems[i].Highlight(); } else { MenuItems[i].Dim(); } } if (manager.A.Pressed) { if (CurrentMenuItem is UIMenu) { manager.Activate(CurrentMenuItem); } else { Trigger(); } } else if (manager.B.Pressed) { CancelAndDeactivate(manager); } }
public override void HandleInput(UIManager manager) { base.HandleInput(manager); if (manager.Left.Pressed) { Counter.Decrement(); } if (manager.Right.Pressed) { Counter.Increment(); } if (manager.A.Pressed) { TriggerAndDeactivate(manager); } if (manager.B.Pressed) { CancelAndDeactivate(manager); } }