Пример #1
0
 public override void MouseButtonClicked(MouseInputAction inputAction, bool inside)
 {
     if (inside)
     {
         OnButtonPressed?.Invoke(inputAction);
     }
 }
        public MouseInputEvent(MouseInputAction action, float _x, float _y, float _z)
        {
            Action            = action;
            KeyboardModifiers = KeyboardModifiers.KeyboardModifierNone;

            x = _x;
            y = _y;
            z = _z;
        }
Пример #3
0
 void SendActionToHandler(MouseInputEvent mouseEvent, MouseInputAction action)
 {
     mouseEvent.Action = action;
     m_mouseInputProcessor.HandleInput(mouseEvent);
 }
Пример #4
0
 /// <summary>
 /// Sets up the Buttons user input actions. This is called automatically when
 /// the Button is created.
 /// </summary>
 protected override void InitInputs()
 {
     area = new Rectangle( Position.X, Position.Y, width, height );
     mouseButtonDown = new MouseInputAction( InputState.MouseButtons.Left, true );
     mouseButtonHeld = new MouseInputAction( InputState.MouseButtons.Left, false );
     cursorOver = new MouseInputAction( MouseInputAction.MouseCursorAction.Hover, area );
 }