LUA psvita TOUCH boton

49 views Asked by At

I'm learning Lua, but I don't understand how to create a button? http://onelua.x10.mx/vita/docs/es/group__touch.html my reference

    if touch.front.count(1).x(100).y(100).pressed then  screen.print(400,400,"ok",1,color.white,color.green)end

did not get a button in exact coordinates

the whole screen works with a single button with this code

if touch.back[1].held if touch.fron[1].held

1

There are 1 answers

1
Adam On

It should look something like this:

if touch.front.count(1).x(100).y(100).pressed then

    screen.print(400,400,"ok",1,color.white,color.green)
    
end

If that isn't the solution then you gave the wrong variable to touch or screen.