{"action":"created","issue":{"url":"https://api.github.com/repos/godotengine/godot/issues/5113","repository_url":"https://api.github.com/repos/godotengine/godot","labels_url":"https://api.github.com/repos/godotengine/godot/issues/5113/labels{/name}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/5113/comments","events_url":"https://api.github.com/repos/godotengine/godot/issues/5113/events","html_url":"https://github.com/godotengine/godot/issues/5113","id":159299128,"number":5113,"title":"Android: events from the mouse bug or a feature? (Discussion)","user":{"login":"ret80","id":233268,"avatar_url":"https://avatars.githubusercontent.com/u/233268?v=3","gravatar_id":"","url":"https://api.github.com/users/ret80","html_url":"https://github.com/ret80","followers_url":"https://api.github.com/users/ret80/followers","following_url":"https://api.github.com/users/ret80/following{/other_user}","gists_url":"https://api.github.com/users/ret80/gists{/gist_id}","starred_url":"https://api.github.com/users/ret80/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ret80/subscriptions","organizations_url":"https://api.github.com/users/ret80/orgs","repos_url":"https://api.github.com/users/ret80/repos","events_url":"https://api.github.com/users/ret80/events{/privacy}","received_events_url":"https://api.github.com/users/ret80/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-08T23:27:55Z","updated_at":"2016-06-09T12:41:30Z","closed_at":null,"body":"Then came the first day:\r\nI make a version for Android and it worked cross:\r\n```\r\nfunc _unhandled_input(e):\r\n\tif e.is_echo() || get_state() != S_LIVE || !e.is_pressed():\r\n\t\treturn\r\n\r\n\tif (e.type == InputEvent.MOUSE_BUTTON && e.button_mask & (BUTTON_LEFT | BUTTON_RIGHT)):\r\n\t\t_next_dir()\r\n\t\tgame.add_score(1)\r\n```\r\nAnd I was glad.\r\nThen came the second day:\r\nThen they gathered for IOS and found that it no longer works. Quickly realizing that what he added:\r\n```\r\nfunc _unhandled_input(e):\r\n\tif e.is_echo() || get_state() != S_LIVE || !e.is_pressed():\r\n\t\treturn\r\n\r\n\tif e.type == InputEvent.SCREEN_TOUCH || (e.type == InputEvent.MOUSE_BUTTON && e.button_mask & (BUTTON_LEFT | BUTTON_RIGHT)):\r\n\t\t_next_dir()\r\n\t\tgame.add_score(1)\r\n```\r\nAnd on IOS earned. And the sun was shining brightly and the sky was cloudless\r\nThen came the third day:\r\nHe returned to the version on the android. He discovered that no longer work. I check all. All all right but still does not work. I began to look and found that the source android getting press on the screen at first sends the press as an event from the mouse and then once already as an event of touch. Because of this action in the script worked twice in a row (the second takes away the first), and I do not what happened.\r\nAttention to the question: why it was done? No need to be combined into one 2 very different events. Well, or at least while on other platforms to make the same behavior."},"comment":{"url":"https://api.github.com/repos/godotengine/godot/issues/comments/224882678","html_url":"https://github.com/godotengine/godot/issues/5113#issuecomment-224882678","issue_url":"https://api.github.com/repos/godotengine/godot/issues/5113","id":224882678,"user":{"login":"reduz","id":6265307,"avatar_url":"https://avatars.githubusercontent.com/u/6265307?v=3","gravatar_id":"","url":"https://api.github.com/users/reduz","html_url":"https://github.com/reduz","followers_url":"https://api.github.com/users/reduz/followers","following_url":"https://api.github.com/users/reduz/following{/other_user}","gists_url":"https://api.github.com/users/reduz/gists{/gist_id}","starred_url":"https://api.github.com/users/reduz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reduz/subscriptions","organizations_url":"https://api.github.com/users/reduz/orgs","repos_url":"https://api.github.com/users/reduz/repos","events_url":"https://api.github.com/users/reduz/events{/privacy}","received_events_url":"https://api.github.com/users/reduz/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T12:41:29Z","updated_at":"2016-06-09T12:41:29Z","body":"It's a feature, makes it easy to port code to mobile. Not every app/game\nneeds multitouch.\n\nOn Thu, Jun 9, 2016 at 5:04 AM, ret80 <notifications@github.com> wrote:\n\n> What I am proposing. It is necessary to divide the mouse event and touch.\n> This must be done either by default or the ability to control it in the\n> settings of the project through what may be the key.\n>\n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/godotengine/godot/issues/5113#issuecomment-224826583>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe/AF-Z2-c7PLN_PwkRpafCwgJLCqOFknyeks5qJ8kCgaJpZM4IxgVt>\n> .\n>\n"}}
{"actor":{"display_login":"reduz"}}