Exemplo n.º 1
0
 public override void HandleInput(MouseButtonEventArgs buttonEventArgs)
 {
     if (Mouse.IsButtonPressed(Mouse.Button.Left))
     {
         if (_menuUI.Contains(buttonEventArgs.X, buttonEventArgs.Y))
         {
             _menuUI.OnClick(buttonEventArgs.X, buttonEventArgs.Y);
         }
     }
 }
Exemplo n.º 2
0
 public override void Update(Vector2i mousePosition)
 {
     if (_gameUI.Contains(mousePosition.X, mousePosition.Y))
     {
         _gameUI.OnHover(mousePosition.X, mousePosition.Y);
     }
     else
     {
         _gameUI.OnIdle(mousePosition.X, mousePosition.Y);
     }
 }