I am creating a game that uses tile based combat on a portion of the screen. I have already mapped a 2d array of nodes (each with a corner position to draw my units) and I have already done some tests with drawing the actual units. Now I need to start working on mouse selection, but am having trouble finding a way to map a mouse click to a particular node in the array. I have the positions stored in each node, but I don't know how exactly to use them. I would like to be able to have someone left click a square and have a way to register which square I actually selected. Any help?
This is an example of part of my grid which is in the bottom half of my screen