Quote Originally Posted by Darkhog View Post
How do I determine which "tile" user clicked as in snapping mouse to grid of certain size?
Easy!
GridXPosition := Mouse.X div GridCellWidth;
And if your map is bigger than what you can render on the screen you have to take into acount your viewing position. So if your viewing position on X axis is at coordinates 145 the forumla would look like this:
GridXPosition := (Mouse.X + ViewpoirtX) div GridCellWidth;

Quote Originally Posted by Darkhog View Post
How do I make showing "tile cursor" (small square of size according to tile's size) in proper place instead of always under mouse?
Once you have grid position you can simply multiply it by grid size like this.
SelectorSprite.X := GridXPosition * GridCellWidth;
And if your map is larger than the screen
SelectorSprite.X := (GridXPosition * GridCellWidth) - ViewportX;