Original Post
Hi
I'm working with DirectX.
I want to be able to get my apps relative x and y position of the mouse. In Xna I did this:
MouseState mouseState = Mouse.GetState();
mouseActor.Position = new Vector2(mouseState.X, mouseState.Y);
Where MouseState and Mouse are usable types in xna.
because i want to be able to able to draw mouseActor in the location of the mouse pointer, and also have another actor drawn in the middle of the screen and i'm trying to draw a line between them.
It is really simple in xna but I thought it might be a tad more complicated in directX. I've read some forums and tutorials but I'm still none the wiser about how to get my problem implemented.
The reason I thought it might be simple is that I used this code to update the position of a sprite on screen, my player sprite, with an xbox controller.
http://ideone.com/HoGHm
--
Wisey
I'm working with DirectX.
I want to be able to get my apps relative x and y position of the mouse. In Xna I did this:
MouseState mouseState = Mouse.GetState();
mouseActor.Position = new Vector2(mouseState.X, mouseState.Y);
Where MouseState and Mouse are usable types in xna.
because i want to be able to able to draw mouseActor in the location of the mouse pointer, and also have another actor drawn in the middle of the screen and i'm trying to draw a line between them.
It is really simple in xna but I thought it might be a tad more complicated in directX. I've read some forums and tutorials but I'm still none the wiser about how to get my problem implemented.
The reason I thought it might be simple is that I used this code to update the position of a sprite on screen, my player sprite, with an xbox controller.
http://ideone.com/HoGHm
--
Wisey