Package net.openosrs.api.input
Interface MouseDriver
-
public interface MouseDriverDriver interface for direct cursor control, clicking, and wheel scrolling. Calls on the client or UI thread return acceptance immediately; background callers may wait for completion. Use compound click methods for an atomic move and click.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleanclick()booleanclick(boolean rightClick)booleanclick(java.awt.Rectangle rectangle)booleanclick(Destination destination)booleanclick(net.runelite.api.Point point)booleanclick(net.runelite.api.Point point, boolean rightClick)booleandrag(int endX, int endY, int button)booleandrag(net.runelite.api.Point to, int button)net.runelite.api.PointgetPosition()voidhop(net.runelite.api.Point point)booleanisDragging()booleanmove(java.awt.Rectangle rectangle)booleanmove(Destination destination)booleanmove(net.runelite.api.Point point)default booleanrotateCamera(int yaw, int pitch, java.util.function.BooleanSupplier interrupt)booleanscroll(boolean up, int timeoutMs, java.util.function.BooleanSupplier condition)voidscroll(int notches)default booleansetCameraZoom(int zoom)default booleansubmitHoldingKey(int keyCode, MenuRequest request)Deliverrequestwith the cursor while holding a modifier key, such as Ctrl for a run toggle on a walk click.default booleantypeAndChoose(java.lang.String text, java.util.function.Supplier<MenuRequest> choice, long timeoutMs, java.util.function.BooleanSupplier context)Typetextinto the open chatbox prompt, wait up totimeoutMsforchoiceto name the interaction that picks the result, then deliver it with the cursor.default booleantypeText(java.lang.String text, boolean enter, java.util.function.BooleanSupplier context)Canvas-local key input; context is checked on the client thread before each key.default booleanzoomCamera(int notches)
-
-
-
Method Detail
-
move
boolean move(net.runelite.api.Point point)
-
move
boolean move(java.awt.Rectangle rectangle)
-
move
boolean move(Destination destination)
-
click
boolean click()
-
click
boolean click(boolean rightClick)
-
click
boolean click(net.runelite.api.Point point)
-
click
boolean click(net.runelite.api.Point point, boolean rightClick)
-
click
boolean click(java.awt.Rectangle rectangle)
-
click
boolean click(Destination destination)
-
scroll
boolean scroll(boolean up, int timeoutMs, java.util.function.BooleanSupplier condition)
-
scroll
void scroll(int notches)
-
getPosition
net.runelite.api.Point getPosition()
-
isDragging
boolean isDragging()
-
drag
boolean drag(net.runelite.api.Point to, int button)
-
drag
boolean drag(int endX, int endY, int button)
-
hop
void hop(net.runelite.api.Point point)
-
typeText
default boolean typeText(java.lang.String text, boolean enter, java.util.function.BooleanSupplier context)Canvas-local key input; context is checked on the client thread before each key.
-
typeAndChoose
default boolean typeAndChoose(java.lang.String text, java.util.function.Supplier<MenuRequest> choice, long timeoutMs, java.util.function.BooleanSupplier context)Typetextinto the open chatbox prompt, wait up totimeoutMsforchoiceto name the interaction that picks the result, then deliver it with the cursor. Runs as one cursor action, so nothing can interleave between typing and choosing.contextmust stay true throughout or the action stops.
-
submitHoldingKey
default boolean submitHoldingKey(int keyCode, MenuRequest request)Deliverrequestwith the cursor while holding a modifier key, such as Ctrl for a run toggle on a walk click. The key is released however the action ends.
-
rotateCamera
default boolean rotateCamera(int yaw, int pitch, java.util.function.BooleanSupplier interrupt)
-
setCameraZoom
default boolean setCameraZoom(int zoom)
-
zoomCamera
default boolean zoomCamera(int notches)
-
-