image scaling on mouse wheel up/down
Posted: Sun Feb 13, 2011 10:24 pm
i have been trying to use the mouse wheel up to zoom in and mouse wheel down to zoom out of an image..i have been trying to find a code for that and been trying to write one myself but cant do it..anyone can help me plz..
function love.load()
hamster = love.graphics.newImage("world_map.gif")
end
function love.update(dt)
if love.mouse.isDown("wu") then
love.graphics.scale(hamster, 45, 65)
end
end
function love.draw()
love.graphics.print( text, 330, 300 )
love.graphics.draw(hamster, x, y)
if love.mouse.isDown("wu") then
love.graphics.scale(hamster, 45, 65)
end
end
end
thank you in anticipation
regards
function love.load()
hamster = love.graphics.newImage("world_map.gif")
end
function love.update(dt)
if love.mouse.isDown("wu") then
love.graphics.scale(hamster, 45, 65)
end
end
function love.draw()
love.graphics.print( text, 330, 300 )
love.graphics.draw(hamster, x, y)
if love.mouse.isDown("wu") then
love.graphics.scale(hamster, 45, 65)
end
end
end
thank you in anticipation
regards