Search found 3 matches
- Wed Jun 20, 2018 9:04 am
- Forum: Support and Development
- Topic: Using mouse input, left mouse button not doing anything??
- Replies: 5
- Views: 3563
Re: Using mouse input, left mouse button not doing anything??
I've got it working now, here is the full code I have no idea why it wasn't working properly before but now it is.. local text function love.load() love.graphics.setNewFont(12) text = "Nothing yet" end function love.update(dt) if love.mouse.isDown( '1' ) then text = "Left mouse button...
- Wed Jun 20, 2018 8:47 am
- Forum: Support and Development
- Topic: Using mouse input, left mouse button not doing anything??
- Replies: 5
- Views: 3563
Re: Using mouse input, left mouse button not doing anything??
Sorry for not giving much context or code, I put the code in the update function;
Code: Select all
function love.update(dt)
if love.mouse.isDown(1) then
text = "Right mouse button has been pressed"
end
if love.mouse.isDown(2) then
text = "Left mouse button has been pressed"
end
end
- Wed Jun 20, 2018 8:07 am
- Forum: Support and Development
- Topic: Using mouse input, left mouse button not doing anything??
- Replies: 5
- Views: 3563
Using mouse input, left mouse button not doing anything??
This works nicely for the right mouse button if love.mouse.isDown(1) then text = "Right mouse button has been pressed" end Left mouse button however causes troubles, I tried other index numbers too, still nilch, nada & zero reaction from love here is the code... if love.mouse.isDown(2)...