mirror of
https://github.com/babalae/better-genshin-impact
synced 2025-01-07 03:17:16 +08:00
add middle button click. Test passed #154
This commit is contained in:
parent
98b744f33f
commit
f1c82f83b0
@ -18,6 +18,14 @@ public interface IMouseSimulator
|
||||
|
||||
public IMouseSimulator LeftButtonDoubleClick();
|
||||
|
||||
public IMouseSimulator MiddleButtonDown();
|
||||
|
||||
public IMouseSimulator MiddleButtonUp();
|
||||
|
||||
public IMouseSimulator MiddleButtonClick();
|
||||
|
||||
public IMouseSimulator MiddleButtonDoubleClick();
|
||||
|
||||
public IMouseSimulator RightButtonDown();
|
||||
|
||||
public IMouseSimulator RightButtonUp();
|
||||
|
@ -72,6 +72,34 @@ public class MouseSimulator : IMouseSimulator
|
||||
return this;
|
||||
}
|
||||
|
||||
public IMouseSimulator MiddleButtonDown()
|
||||
{
|
||||
User32.INPUT[] inputList = new InputBuilder().AddMouseButtonDown(MouseButton.MiddleButton).ToArray();
|
||||
SendSimulatedInput(inputList);
|
||||
return this;
|
||||
}
|
||||
|
||||
public IMouseSimulator MiddleButtonUp()
|
||||
{
|
||||
User32.INPUT[] inputList = new InputBuilder().AddMouseButtonUp(MouseButton.MiddleButton).ToArray();
|
||||
this.SendSimulatedInput(inputList);
|
||||
return this;
|
||||
}
|
||||
|
||||
public IMouseSimulator MiddleButtonClick()
|
||||
{
|
||||
User32.INPUT[] inputList = new InputBuilder().AddMouseButtonClick(MouseButton.MiddleButton).ToArray();
|
||||
SendSimulatedInput(inputList);
|
||||
return this;
|
||||
}
|
||||
|
||||
public IMouseSimulator MiddleButtonDoubleClick()
|
||||
{
|
||||
User32.INPUT[] inputList = new InputBuilder().AddMouseButtonDoubleClick(MouseButton.MiddleButton).ToArray();
|
||||
SendSimulatedInput(inputList);
|
||||
return this;
|
||||
}
|
||||
|
||||
public IMouseSimulator RightButtonDown()
|
||||
{
|
||||
User32.INPUT[] inputList = new InputBuilder().AddMouseButtonDown(MouseButton.RightButton).ToArray();
|
||||
|
Loading…
Reference in New Issue
Block a user