DPB2Class · Utilities and settings

MouseManager

This class control the mouse movements. While most of the time you don't need to call this class (you use the various LokiPoe classes to interact with the game world, Ui and actions, Sometime you might want to do something that the Framework is not already doing, in that case you can call this class and move the mouse at your will.

Namespace: DreamPoeBot.BotFramework

public static class MouseManagerView DPB1 version →

Members and overloads

37 results

DebugCursor

FieldLink ↗
public static bool MouseManager.DebugCursor

Enable and disable the Mouse debugging (Shift-Alt-X with the GAME WINDOWS focused) When the DebugCursor is active, the framework move the mouse cursor so you can see where its pointing.

ThisMouseMoverDelegate

FieldLink ↗
public static MouseManager.MouseMoverDelegate MouseManager.ThisMouseMoverDelegate

Allows you to set a delegate that will control the mouse movement from the current mouse position to a destination position. The delegate contains 3 parameters: Vector2i destination: The final mouse position desired. Vector2i normalizedDestination: The final mouse position, confined in the game window (this is equal to destination in case the position is already inside the window) Vector2i currentPosition: The actual mouse position. It is your duty to eventually set the debugMouse position, and actually move the mouse. This is what the original code look like:

ClickLMB

MethodLink ↗
public static void MouseManager.ClickLMB(int cx = 0, int cy = 0)

Click the left mouse button, Pls NOTE: Its important to pass the X and Y location if you click on a User Interface control, while is not necessary if you click on the game world.

cxint
X coordinate
cyint
Y coordinate

ClickMMB

MethodLink ↗
public static void MouseManager.ClickMMB(int cx, int cy)

Click the middle mouse button, Pls NOTE: Its important to pass the X and Y location if you click on a User Interface control, while is not necessary if you click on the game world.

cxint
X coordinate
cyint
Y coordinate

ClickRMB

MethodLink ↗
public static void MouseManager.ClickRMB(int cx, int cy)

Double Click the right mouse button, Pls NOTE: Its important to pass the X and Y location if you click on a User Interface control, while is not necessary if you click on the game world.

cxint
X coordinate
cyint
Y coordinate

ClickXB1

MethodLink ↗
public static void MouseManager.ClickXB1(int cx, int cy)

Clicks xb1 using the supplied arguments.

cxint
Specifies cx.
cyint
Specifies cy.

ClickXB2

MethodLink ↗
public static void MouseManager.ClickXB2(int cx, int cy)

Clicks xb2 using the supplied arguments.

cxint
Specifies cx.
cyint
Specifies cy.

DblClickLMB

MethodLink ↗
public static void MouseManager.DblClickLMB(int cx, int cy)

Double Click the left mouse button, Pls NOTE: Its important to pass the X and Y location if you click on a User Interface control, while is not necessary if you click on the game world.

cxint
X coordinate
cyint
Y coordinate

DblClickMMB

MethodLink ↗
public static void MouseManager.DblClickMMB(int cx, int cy)

Double Click the middle mouse button, Pls NOTE: Its important to pass the X and Y location if you click on a User Interface control, while is not necessary if you click on the game world.

cxint
X coordinate
cyint
Y coordinate

DblClickRMB

MethodLink ↗
public static void MouseManager.DblClickRMB(int cx, int cy)

Double Click the right mouse button, Pls NOTE: Its important to pass the X and Y location if you click on a User Interface control, while is not necessary if you click on the game world.

cxint
X coordinate
cyint
Y coordinate

DblClickXB1

MethodLink ↗
public static void MouseManager.DblClickXB1(int cx, int cy)

Executes the dbl click xb1 operation with the supplied arguments.

cxint
Specifies cx.
cyint
Specifies cy.

DblClickXB2

MethodLink ↗
public static void MouseManager.DblClickXB2(int cx, int cy)

Executes the dbl click xb2 operation with the supplied arguments.

cxint
Specifies cx.
cyint
Specifies cy.

GetMousePosition

MethodLink ↗
public static Vector2i MouseManager.GetMousePosition()

Retrieve the actual mouse position.

Returns: The Vector2i result.

NormalizePosition

MethodLink ↗
public static Vector2i MouseManager.NormalizePosition(Vector2i position)

Executes the normalize position operation with the supplied arguments.

positionVector2i
Specifies position.

Returns: The Vector2i result.

PostMouseMovement

MethodLink ↗
public static void MouseManager.PostMouseMovement(int x, int y, bool sleep = true)

Execute the internal PostMessage to add the mouse movement to the system message queue, mostly used for internal purpose or to control the mouse with ThisMouseMoverDelegate.

xint
The X position
yint
The Y position
sleepbool
sleep for random 0, 4 if true.

PressLMB

MethodLink ↗
public static void MouseManager.PressLMB(int cx, int cy)

Press the left mouse button and keep it pressed, Pls NOTE: Its important to pass the X and Y location if you click on a User Interface control, while is not necessary if you click on the game world.

cxint
X coordinate
cyint
Y coordinate

PressMMB

MethodLink ↗
public static void MouseManager.PressMMB(int cx, int cy)

Press the middle mouse button and keep it pressed, Pls NOTE: Its important to pass the X and Y location if you click on a User Interface control, while is not necessary if you click on the game world.

cxint
X coordinate
cyint
Y coordinate

PressRMB

MethodLink ↗
public static void MouseManager.PressRMB(int cx, int cy)

Press the right mouse button and keep it pressed, Pls NOTE: Its important to pass the X and Y location if you click on a User Interface control, while is not necessary if you click on the game world.

cxint
X coordinate
cyint
Y coordinate

PressXB1

MethodLink ↗
public static void MouseManager.PressXB1(int cx, int cy)

Executes the press xb1 operation with the supplied arguments.

cxint
Specifies cx.
cyint
Specifies cy.

PressXB2

MethodLink ↗
public static void MouseManager.PressXB2(int cx, int cy)

Executes the press xb2 operation with the supplied arguments.

cxint
Specifies cx.
cyint
Specifies cy.

ReleaseLMB

MethodLink ↗
public static void MouseManager.ReleaseLMB(int cx, int cy)

Release the left mouse button and keep it pressed, Pls NOTE: Its important to pass the X and Y location if you click on a User Interface control, while is not necessary if you click on the game world.

cxint
X coordinate
cyint
Y coordinate

ReleaseMMB

MethodLink ↗
public static void MouseManager.ReleaseMMB(int cx, int cy)

Release the middle mouse button and keep it pressed, Pls NOTE: Its important to pass the X and Y location if you click on a User Interface control, while is not necessary if you click on the game world.

cxint
X coordinate
cyint
Y coordinate

ReleaseRMB

MethodLink ↗
public static void MouseManager.ReleaseRMB(int cx, int cy)

Release the right mouse button and keep it pressed, Pls NOTE: Its important to pass the X and Y location if you click on a User Interface control, while is not necessary if you click on the game world.

cxint
X coordinate
cyint
Y coordinate

ReleaseXB1

MethodLink ↗
public static void MouseManager.ReleaseXB1(int cx, int cy)

Releases xb1 using the supplied arguments.

cxint
Specifies cx.
cyint
Specifies cy.

ReleaseXB2

MethodLink ↗
public static void MouseManager.ReleaseXB2(int cx, int cy)

Releases xb2 using the supplied arguments.

cxint
Specifies cx.
cyint
Specifies cy.

ResetMousePosition

MethodLink ↗
public static void MouseManager.ResetMousePosition()

Reset the mouse position to the center of the game screen.

ScrollMouseDown

MethodLink ↗
public static void MouseManager.ScrollMouseDown(int clicks = 1, int cx = 0, int cy = 0)

Trigger the scroll wheel down.

clicksint
The numbers of click you want to scroll.
cxint
X coordinate
cyint
Y coordinate

ScrollMouseUp

MethodLink ↗
public static void MouseManager.ScrollMouseUp(int clicks = 1, int cx = 0, int cy = 0)

Trigger the scroll wheel up.

clicksint
The numbers of click you want to scroll.
cxint
X coordinate
cyint
Y coordinate

SetMousePos

MethodLink ↗
public static void MouseManager.SetMousePos(string reason, Vector2 destination, bool actualymove = true)

Move the mouse to a specific location using world position (position of game objects) This method take care of converting the world position accounting for the current camera zoom and rotation, to screen position.

reasonstring
The reason of of the move, usually used for debugging purpose.
destinationVector2
the position where to move the mouse.
actualymovebool
Deprecated, this is always true.

SetMousePos

MethodLink ↗
public static void MouseManager.SetMousePos(string reason, Vector2i destination, bool actualymove = true)

Move the mouse to a specific location using world position (position of game objects) This method take care of converting the world position accounting for the current camera zoom and rotation, to screen position.

reasonstring
The reason of of the move, usually used for debugging purpose.
destinationVector2i
the position where to move the mouse.
actualymovebool
Deprecated, this is always true.

Related types

DPB2 0.4.5.88 · Reference reviewed 2026-10-02. Descriptions use source summaries where available, otherwise concise signature-based descriptions. Examples illustrate usage; they are not a live-game test.