Hello
I found a finger painting library on the internet. I can use it like this:
local fingerPaint = require("fingerPaint")
local canvas = fingerPaint.newCanvas(width,height,thickness,...)
But I want to put a color palette on the page so that the user can paint in the color of their choice after clicking on them.
I know something about listeners. But I do not know how to implement such a program. In fact, I have no idea.
I wrote the following code but it did not work at all:
local fingerPaint = require("fingerPaint")
local function onTap( event )
color={1,0,0}
local canvas = fingerPaint.newCanvas(100,200,30,color)
end
local red=display.newImageRect("red.png",100,100)
red.x=0
red.y=0
red:addEventListener( "tap", onTap )
Do you have an idea in this regard?