Answer the question
In order to leave comments, you need to log in
How to change parameters in love2d?
There is a code for love2d
function button(mode, x1, y1, width, height, r1, g1, b1)
color = {r1, g1, b1}
love.graphics.setColor(color)
love.graphics.rectangle(mode, x1, y1, width, height)
r1 = r1 + .1
end
Answer the question
In order to leave comments, you need to log in
Why something does not work in the program, you need to find out by debugging .
For Lua, this is a function. print()
The problem is localized like this:
love.graphics.rectangle()
with known parameters to make sure that the function basically works with these parameters and that this is not the case.print(mode, x1, y1, width, height)
to make sure that a) the program, in principle, has reached this point, b) the parameters are exactly what you need.print()
in another place to check it too.Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question