How i can use this button so user can click on directions

hello comunity i hope you are doing good ? please if someone can show me how i can use this button , exemple when user click on left the click is just on left not all button and when he click on right the button click just on right

1 Like

Create an sprite with the image of the button and place it on a canvas. When the user taps the left side of the sprite carry out the procedures for it. When the user taps the right side of the sprite carry out the procedures for it.

To know which side the user tapped get the x-position of the tap. If it’s less than or equal to [(0.5 x sprite width) + sprite’s x-position] then user tapped the left side. Otherwise they tapped the right.

1 Like

can i share with you button image so you can understand what i mean ?

1 Like

ronbutton

this button i wan make it 4 buttons so user can click up down right and left

1 Like

This is a little more complicated because you really need to detect triangular areas that are clicked:

a2a62cd8e4da98bec816858a3ee7ce636fcba174

The only thing that comes to mind is using an arc formula to determine if the click is inside one of the four arcs. This might or might not be helpful:

2 Likes

Place the image in a row or column and then add more rows or columns inside the main one to position buttons with transparent colour on top of the arrows.

This way you will be able to do what you are describing.

Happy Thunking!

1 Like

but if you add more rows you can not add it on the button

1 Like

It’s not a button. Just a background picture. Then add transparent buttons over the picture and position them in place of the arrows.

222
look at this if i add more rows inside it give me this you can not add row on the image

1 Like

exxde
it looks like this i can not add buttons on the image

1 Like

try using the drag and drop UI

its not work

in drag and drop you can place things on stack. so select the use drag and drop layout checkbox when creating new project- see here

Try this
clock on the arrows and OK and see the label changes
https://x.thunkable.com/projectPage/6131be9f22654c0010731536

See a demo on the phone

1 Like

sir thank you so much i have fixe thank you for your help

1 Like