{"action":"created","issue":{"url":"https://api.github.com/repos/HaxePunk/HaxePunk/issues/471","repository_url":"https://api.github.com/repos/HaxePunk/HaxePunk","labels_url":"https://api.github.com/repos/HaxePunk/HaxePunk/issues/471/labels{/name}","comments_url":"https://api.github.com/repos/HaxePunk/HaxePunk/issues/471/comments","events_url":"https://api.github.com/repos/HaxePunk/HaxePunk/issues/471/events","html_url":"https://github.com/HaxePunk/HaxePunk/pull/471","id":223296556,"number":471,"title":"Input refactor","user":{"login":"bendmorris","id":544977,"avatar_url":"https://avatars1.githubusercontent.com/u/544977?v=3","gravatar_id":"","url":"https://api.github.com/users/bendmorris","html_url":"https://github.com/bendmorris","followers_url":"https://api.github.com/users/bendmorris/followers","following_url":"https://api.github.com/users/bendmorris/following{/other_user}","gists_url":"https://api.github.com/users/bendmorris/gists{/gist_id}","starred_url":"https://api.github.com/users/bendmorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bendmorris/subscriptions","organizations_url":"https://api.github.com/users/bendmorris/orgs","repos_url":"https://api.github.com/users/bendmorris/repos","events_url":"https://api.github.com/users/bendmorris/events{/privacy}","received_events_url":"https://api.github.com/users/bendmorris/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/HaxePunk/HaxePunk/milestones/10","html_url":"https://github.com/HaxePunk/HaxePunk/milestone/10","labels_url":"https://api.github.com/repos/HaxePunk/HaxePunk/milestones/10/labels","id":2040402,"number":10,"title":"Version 4.0.0","description":"","creator":{"login":"bendmorris","id":544977,"avatar_url":"https://avatars1.githubusercontent.com/u/544977?v=3","gravatar_id":"","url":"https://api.github.com/users/bendmorris","html_url":"https://github.com/bendmorris","followers_url":"https://api.github.com/users/bendmorris/followers","following_url":"https://api.github.com/users/bendmorris/following{/other_user}","gists_url":"https://api.github.com/users/bendmorris/gists{/gist_id}","starred_url":"https://api.github.com/users/bendmorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bendmorris/subscriptions","organizations_url":"https://api.github.com/users/bendmorris/orgs","repos_url":"https://api.github.com/users/bendmorris/repos","events_url":"https://api.github.com/users/bendmorris/events{/privacy}","received_events_url":"https://api.github.com/users/bendmorris/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":10,"state":"open","created_at":"2016-09-30T16:00:19Z","updated_at":"2017-04-21T07:06:28Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2017-04-21T07:06:12Z","updated_at":"2017-04-22T20:57:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/HaxePunk/HaxePunk/pulls/471","html_url":"https://github.com/HaxePunk/HaxePunk/pull/471","diff_url":"https://github.com/HaxePunk/HaxePunk/pull/471.diff","patch_url":"https://github.com/HaxePunk/HaxePunk/pull/471.patch"},"body":"Input is used to check for logical actions, not specific types of input, which Key, Mouse, and individual connected Gamepads can each define. Instead of Input.define, specific define functions are used:\r\n\r\n```\r\nKey.define(\"left\", [Key.LEFT, Key.A]);\r\nmyGamepad.defineButton(\"left\", [PS3_CONTROLLER.DPAD_LEFT]);\r\nmyGamepad.defineAxis(\"left\", PS3_CONTROLLER.LEFT_ANALOGUE_X, -0.1, -1);\r\nMouse.define(\"left\", MouseButton.LEFT);\r\n```\r\n\r\nThese can all be polled using a single call: `Input.check(\"left\")`, `Input.pressed(\"left\")`, `Input.released(\"left\")`\r\n\r\nAlso supports signals at the scene and engine level: `scene.inputPressed.left.bind(myFunction)`\r\n\r\nMoves the logic for various input types to their own classes, and fixes Gamepad support for Lime.\r\n\r\nFor me the biggest break in this change was all the moved mouse logic from `Input`. It might be worth preserving those references, but it might be better to just rip the bandaid off now.\r\n\r\nI'd like to eventually add Gesture support as well but that can be done later on.\r\n\r\n- [x] Better typed signal implementation\r\n- [x] Add MIGRATION notes\r\n- [x] Standardize when input signals get fired (probably not directly in event handler, maybe at preUpdate step)"},"comment":{"url":"https://api.github.com/repos/HaxePunk/HaxePunk/issues/comments/296401034","html_url":"https://github.com/HaxePunk/HaxePunk/pull/471#issuecomment-296401034","issue_url":"https://api.github.com/repos/HaxePunk/HaxePunk/issues/471","id":296401034,"user":{"login":"bendmorris","id":544977,"avatar_url":"https://avatars1.githubusercontent.com/u/544977?v=3","gravatar_id":"","url":"https://api.github.com/users/bendmorris","html_url":"https://github.com/bendmorris","followers_url":"https://api.github.com/users/bendmorris/followers","following_url":"https://api.github.com/users/bendmorris/following{/other_user}","gists_url":"https://api.github.com/users/bendmorris/gists{/gist_id}","starred_url":"https://api.github.com/users/bendmorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bendmorris/subscriptions","organizations_url":"https://api.github.com/users/bendmorris/orgs","repos_url":"https://api.github.com/users/bendmorris/repos","events_url":"https://api.github.com/users/bendmorris/events{/privacy}","received_events_url":"https://api.github.com/users/bendmorris/received_events","type":"User","site_admin":false},"created_at":"2017-04-22T20:57:13Z","updated_at":"2017-04-22T20:57:13Z","body":"There's no good way to test this together with an examples update since Travis doesn't find the new examples commit. To be safe I pushed the examples update first, and if there's a problem I'll just revert it."}}
{"actor":{"display_login":"bendmorris"}}