PDA

View Full Version : find out map coordinates the easy way..



FlyingFish
05-09-2004, 02:44 PM
Hi guys!

I think I need a little advice again...

As I (maybe) mentioned before I'm working on a tile-based iso engine in DelphiX.
In my editor the user should be able to change the textures of the tiles by selecting a texture from a list and then just clicking in the map where he wants to have the texture.
For this I need to know (of course) where the user has clicked on the map.
Well, I could find out the cursor position on the screen and convert these values to coordinates in my dxdraw and then in map-coordinates. But this is quite circumstantial and I think there must be a way to do it easier..

Can I somehow find out the cursor position in the component I clicked in without all the calculating?

thanx for any ideas!

sven

Paulius
05-09-2004, 04:25 PM
Objects derived from TControl have OnMouseDown etc. events