I'm trying to make a simple level editor for a game I'm making. Its probably going to be tile based, and I want to be able to click on a tile to select it, then press 1-9 to change that tile to the corresponding number (1 for dirt, 2 for grass, etc). The problem is I don't know how to tell what was clicked on...

Any suggestions would be appreciated!

//napKIN