Пример #1
0
 public void Initialize()
 {
     buttons.Add(new MouseButton(
                     () => mouseCore.LeftButton,
                     () => ButtonPress?.Invoke(this, new MouseButtonInteraction(X, Y, Input.MouseButton.Left)),
                     () => ButtonHold?.Invoke(this, new MouseButtonInteraction(X, Y, Input.MouseButton.Left)),
                     () => ButtonLift?.Invoke(this, new MouseButtonInteraction(X, Y, Input.MouseButton.Left))));
     buttons.Add(new MouseButton(
                     () => mouseCore.MiddleButton,
                     () => ButtonPress?.Invoke(this, new MouseButtonInteraction(X, Y, Input.MouseButton.Middle)),
                     () => ButtonHold?.Invoke(this, new MouseButtonInteraction(X, Y, Input.MouseButton.Middle)),
                     () => ButtonLift?.Invoke(this, new MouseButtonInteraction(X, Y, Input.MouseButton.Middle))));
     buttons.Add(new MouseButton(
                     () => mouseCore.RightButton,
                     () => ButtonPress?.Invoke(this, new MouseButtonInteraction(X, Y, Input.MouseButton.Right)),
                     () => ButtonHold?.Invoke(this, new MouseButtonInteraction(X, Y, Input.MouseButton.Right)),
                     () => ButtonLift?.Invoke(this, new MouseButtonInteraction(X, Y, Input.MouseButton.Right))));
 }
Пример #2
0
 internal static void InvokePress(MouseButton button)
 {
     System.Diagnostics.Debug.Assert(heldButtons.Add(button), "added a button which was pressed");
     ButtonPress?.Invoke(button);
 }
Пример #3
0
 protected void InvokeButtonPress(GamePadButton b)
 {
     AppConsole.WriteLine("Button Press: " + b, EventLevel.Debugging);
     ButtonPress?.Invoke(b);
 }
Пример #4
0
 public void InvokeButtonPress(CalculatorButtonPressEventArgs e)
 {
     ButtonPress?.Invoke(this, e);
 }
Пример #5
0
 /// <summary>
 ///     Raises the <see cref="E:ButtonPress" /> event.
 /// </summary>
 /// <param name="e">The <see cref="LogiFrame.ButtonEventArgs" /> instance containing the event data.</param>
 protected virtual void OnButtonPress(ButtonEventArgs e)
 {
     ButtonPress?.Invoke(this, e);
 }
Пример #6
0
 public void TriggerButtonPress(object sender, ButtonEventArgs args)
 {
     ButtonPress.Invoke(sender, args);
 }