Answer the question
In order to leave comments, you need to log in
How to get the coordinates of the button click location?
I have a button on the widget, the size of the button is 64x64 pixels. How to get the click coordinates of a part of a button? What do you mean, which part of the button was pressed? In the center, in the corner of the button, etc.
If we take the conditional coordinates of the button, then the upper left corner will have coordinates 0x0, the lower right corner 64x64. Pressing in the upper left corner can be x=24 y=30. These are the coordinates I need to get.
InputTouch does not work and shows the coordinates x=0 y=0 z=0, because the button is actually implemented as a separate inline widget and is not intercepted. Removing focus from the button also did not help.
Maybe there is some kind of implementation through an arbitrary element, for example, a picture. On which it is possible to hang up procedure and to remove coordinates.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question