1
Graphics / Localize mouse position
« on: December 23, 2008, 10:42:17 pm »
Hi everybody,
I want to find out if my mouse is about an area or an object (with other words, a sprite ).
(this sprites are not made by myself!!!)
An example: Here the mouse can be about the Tile 1, 2 or about the empty space... the thing that could make it a bit different is, that I don´t want to use fix coordinates in my source, like
So, I tried a few things, but without any succes^^
Why does it not work?
Thanks in advance!
I want to find out if my mouse is about an area or an object (with other words, a sprite ).
(this sprites are not made by myself!!!)
An example: Here the mouse can be about the Tile 1, 2 or about the empty space... the thing that could make it a bit different is, that I don´t want to use fix coordinates in my source, like
Code: [Select]
(Cursor.GetPosition().x >= 200)
So, I tried a few things, but without any succes^^
Code: [Select]
if((Cursor.GetPosition().x == Sprite1.GetPosition().x) && (Cursor.GetPosition().y == Sprite1.GetPosition().y))
Why does it not work?
Thanks in advance!