Attribute VB_Name = "Mouse"

Option Explicit

Dim Center_X As Long
Dim Center_Y As Long

Public Sub Mouse_Init()
     'Convert from twips to pixels and divide by 2 to get the screen's center position
    Center_X = Screen.Width / 30
    Center_Y = Screen.Height / 30
    frmMain.DGE.Windows_SetCursorPos Center_X, Center_Y
End Sub

Public Function Mouse_GetOffsetSinceLastCall() As Vector2
    Mouse_GetOffsetSinceLastCall.X = frmMain.DGE.Windows_GetCursorPos_X - Center_X
    Mouse_GetOffsetSinceLastCall.Y = frmMain.DGE.Windows_GetCursorPos_Y - Center_Y
    frmMain.DGE.Windows_SetCursorPos Center_X, Center_Y
End Function
