function love.update(dt)
if love.mouse.getY() >= 65 and love.mouse.getY() <= 65 + 33 then
selectedbutton = 1
if love.mouse.isDown("l") and mon == true then
mon = false
gameplay = 2
wait(2)
gameplay = 1
end
end
end
Doesn't do anything.
mon is a value set to True somewhere else in the script.
local mon = true
local selectedbutton = nil
local gameplay = 0
local function wait(n)
love.window.setTitle(tostring(love.timer.getTime()))
end
function love.draw()
local r,g,b,a = love.graphics.getColor()
local newa = mon and 170 or 255
love.graphics.setColor(218, 0, 0, newa)
love.graphics.print(("x: %.2f y: %.2f Gameplay: %d"):format(love.mouse.getX(),
love.mouse.getY(), gameplay), 2, 2)
love.graphics.rectangle("fill", 0, 65, 800, 33)
love.graphics.setColor(r,g,b,a)
end
function love.update(dt)
if love.mouse.getY() >= 65 and love.mouse.getY() <= 65 + 33 then
selectedbutton = 1
if love.mouse.isDown("l") and mon == true then
mon = false
gameplay = 2
wait(2)
gameplay = 1
end
end
end