draw sprite on mouse click
Posted: Fri Dec 07, 2012 10:00 pm
I want to make a simle Tic-Tac-Toe game with Love2D. So my question is:
How can I make to draw the X.bmp or O.bmp when I click with the mouse on some position (I have the logic how to find where to draw them, but I don't know how to make the stay there when I click). So I need to know (currently with my code I am holding the image, and its following the mouse cursor, but I need when I click somewhere it should be placed there, and the image for example from X.bmp to be changed to O.bmp)
Thanks
How can I make to draw the X.bmp or O.bmp when I click with the mouse on some position (I have the logic how to find where to draw them, but I don't know how to make the stay there when I click). So I need to know (currently with my code I am holding the image, and its following the mouse cursor, but I need when I click somewhere it should be placed there, and the image for example from X.bmp to be changed to O.bmp)
Thanks