Search found 2 matches

by maxime
Fri Feb 04, 2011 4:20 pm
Forum: Support and Development
Topic: Drawing things on mouse event.
Replies: 7
Views: 2112

Re: Drawing things on mouse event.

I tried with the table. I used a 2d table and it works great! this is the main piece of code in the draw function: for i=0,40 do for j=0,30 do if t[i][j].z == 1 then love.graphics.draw(img.ston1, t[i][j].x, t[i][j].y) elseif t[i][j].z == 2 then love.graphics.draw(img.stone2, t[i][j].x, t[i][j].y) en...
by maxime
Fri Feb 04, 2011 11:33 am
Forum: Support and Development
Topic: Drawing things on mouse event.
Replies: 7
Views: 2112

Drawing things on mouse event.

Hi, I'm new here; I had a question about how to draw things. I would like to draw an image when i click with my mouse. And I want the image to be drawn when I click somewhere else without deleting the old one. How can I do this? :awesome: function love.load() img = { stone = love.graphics.newImage(&...