Hi,
Bottom code works as expected on desktop & HTML5 builds.
Bottom code does not work as expected on Android build?
if action_id == hash("ClickGUI") and mY < 575 then
PlayerDirection = -1
else
PlayerDirections = 1
end
Screen vertical size is 640.
“mY” is a global variable with current mouse screen Y.
Seems like screen vertical coordinates are reversed on Android?
Can someone confirm this?
Thanks!
Jesse
britzl
2
No, the coordinates are not reversed. Bottom left is always 0,0 and top right is always window width, height.
Ok, thanks…
Must be something in my code.
I’ll hit it with a hammer.
Jesse
Edd
4
Wouldn’t it be easier to create two transparent(invisible) buttons and gui.pick_node
, also taking into account the adjust_mode in your GUI.
Edd
5
@britzl is it possible to change the adjust_mode of all nodes in a single line of code, rather than changing them one by one with:
gui.set_adjust_mode(each_node, mode)
britzl
6
No, that’s the function to use. You could create your own utility function and pass in a list of nodes or something.
1 Like
if action_id == hash("ClickGUI") and mY * (640/WindowHeightTrue) < 575 then
PlayerDirection = -1
else
PlayerDirections = 1
end