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
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.
can i share with you button image so you can understand what i mean ?
this button i wan make it 4 buttons so user can click up down right and left
This is a little more complicated because you really need to detect triangular areas that are clicked:
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:
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.
but if you add more rows you can not add it on the button
It’s not a button. Just a background picture. Then add transparent buttons over the picture and position them in place of the arrows.
look at this if i add more rows inside it give me this you can not add row on the image
it looks like this i can not add buttons on the image
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
clock on the arrows and OK and see the label changes
See a demo on the phone
sir thank you so much i have fixe thank you for your help