I created a game and would like to test it on android, but it does not respond to any touch on the screen, I think it's because I have to adapt the game code for android. Click => Touch

I developed it and tested it with the selected target (windows):

enter image description here

I was able to put it to run on an android virtual machine, but it does not respond to any commands:

enter image description here

How could he do that?

How to adapt the function => if (point_in_rectangle(window_mouse_get_x(),window_mouse_get_y(),60,250,104,313)) && config==false for example? For something that works for android.

I hope I have been clear. What I want exactly is to turn all game mouse clicks into screen touches.

Sorry for any translation error and thank you already

  • 1
    \$\begingroup\$ I did a google translate on it; looks pretty simple. \$\endgroup\$
    – Almo
    Jul 7, 2017 at 15:17
  • \$\begingroup\$ Yes, not only the problem, but the game is also simple. But none of the buttons work, do not leave this screen. \$\endgroup\$ Jul 7, 2017 at 23:10
  • \$\begingroup\$ Draw rectangles you checking, like draw_rectangle(60,250,104,313,true); so you'll be able to see where it is actually at the screen. The problem depends on lot of things, like is there used scaling (and what way used for this), how you define objects' positions, etc. \$\endgroup\$
    – Dmi7ry
    Jul 8, 2017 at 7:42
  • \$\begingroup\$ Even though this is just a click function? \$\endgroup\$ Jul 8, 2017 at 21:15

1 Answer 1


I found the solution. The code I posted in the question works for the application on windows, to make it work for android is just modifying it as follows:

if (point_in_rectangle(window_mouse_get_x(),window_mouse_get_y(),60,250,104,313)) && config==false <= becomes => if device_mouse_x(0)>=60 && device_mouse_y(0)>=250 && device_mouse_x(0)<=104 && device_mouse_y(0)<=313{

Link => https://docs.yoyogames.com/source/dadiospice/002_reference/mouse,%20keyboard%20and%20other%20controls/device%20input/index.html


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .