Original Post
My problem is that since I keep track of my mouses position like this:
MouseState = mDInput.ReadMouse();
MouseXPos += MouseState.lX;
MouseYPos += MouseState.lY;
what can I set MouseXPos and MouseYPos to intially, right now I set them both to zero but since my cursor can be in different positions
when the game is launched my menu items that use the mouse never line up.
My game runs in both full screen and window mode which creates another problem.
COULD I SET THE MOUSE POSITION TO (0,0), AND HOW?
IF NOT HOW CAN I SLOVE THIS PROBLEM.
Here is some more code showing what I am trying to do.
while(Ptr!=NULL){
if(MouseXPos >= Ptr-> location.x &&
MouseXPos <=(Ptr-> location.x + Ptr->width) &&
MouseYPos >= Ptr-> location.y &&
MouseYPos <=(Ptr->location.y + Ptr->height))
{
Ptr->srcRect.left=200;
Ptr->srcRect.right=400;
}
else{
Ptr->srcRect.left=0;
Ptr->srcRect.right=200;
}
Ptr=Ptr->Next;
}
thank you for helping me
-Dapeos