{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1540","labels_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1540/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1540/comments","events_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1540/events","html_url":"https://github.com/HaxeFlixel/flixel/issues/1540","id":90474085,"number":1540,"title":"Move screenCenter() from FlxSpriteUtil to FlxObject","user":{"login":"Gama11","id":2620907,"avatar_url":"https://avatars.githubusercontent.com/u/2620907?v=3","gravatar_id":"","url":"https://api.github.com/users/Gama11","html_url":"https://github.com/Gama11","followers_url":"https://api.github.com/users/Gama11/followers","following_url":"https://api.github.com/users/Gama11/following{/other_user}","gists_url":"https://api.github.com/users/Gama11/gists{/gist_id}","starred_url":"https://api.github.com/users/Gama11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gama11/subscriptions","organizations_url":"https://api.github.com/users/Gama11/orgs","repos_url":"https://api.github.com/users/Gama11/repos","events_url":"https://api.github.com/users/Gama11/events{/privacy}","received_events_url":"https://api.github.com/users/Gama11/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/HaxeFlixel/flixel/labels/Breaking%20Change","name":"Breaking Change","color":"eb6420"},{"url":"https://api.github.com/repos/HaxeFlixel/flixel/labels/Improvement","name":"Improvement","color":"207de5"}],"state":"open","locked":false,"assignee":{"login":"Gama11","id":2620907,"avatar_url":"https://avatars.githubusercontent.com/u/2620907?v=3","gravatar_id":"","url":"https://api.github.com/users/Gama11","html_url":"https://github.com/Gama11","followers_url":"https://api.github.com/users/Gama11/followers","following_url":"https://api.github.com/users/Gama11/following{/other_user}","gists_url":"https://api.github.com/users/Gama11/gists{/gist_id}","starred_url":"https://api.github.com/users/Gama11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gama11/subscriptions","organizations_url":"https://api.github.com/users/Gama11/orgs","repos_url":"https://api.github.com/users/Gama11/repos","events_url":"https://api.github.com/users/Gama11/events{/privacy}","received_events_url":"https://api.github.com/users/Gama11/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/HaxeFlixel/flixel/milestones/7","html_url":"https://github.com/HaxeFlixel/flixel/milestones/4.0.0","labels_url":"https://api.github.com/repos/HaxeFlixel/flixel/milestones/7/labels","id":1141136,"number":7,"title":"4.0.0","description":"","creator":{"login":"Gama11","id":2620907,"avatar_url":"https://avatars.githubusercontent.com/u/2620907?v=3","gravatar_id":"","url":"https://api.github.com/users/Gama11","html_url":"https://github.com/Gama11","followers_url":"https://api.github.com/users/Gama11/followers","following_url":"https://api.github.com/users/Gama11/following{/other_user}","gists_url":"https://api.github.com/users/Gama11/gists{/gist_id}","starred_url":"https://api.github.com/users/Gama11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gama11/subscriptions","organizations_url":"https://api.github.com/users/Gama11/orgs","repos_url":"https://api.github.com/users/Gama11/repos","events_url":"https://api.github.com/users/Gama11/events{/privacy}","received_events_url":"https://api.github.com/users/Gama11/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":7,"state":"open","created_at":"2015-05-30T10:47:00Z","updated_at":"2015-06-29T19:31:17Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-06-23T19:42:21Z","updated_at":"2015-06-30T14:20:10Z","closed_at":null,"body":"\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/22852627-move-screencenter-from-flxspriteutil-to-flxobject?utm_campaign=plugin&utm_content=tracker%2F254189&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F254189&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/comments/117204496","html_url":"https://github.com/HaxeFlixel/flixel/issues/1540#issuecomment-117204496","issue_url":"https://api.github.com/repos/HaxeFlixel/flixel/issues/1540","id":117204496,"user":{"login":"SeiferTim","id":141478,"avatar_url":"https://avatars.githubusercontent.com/u/141478?v=3","gravatar_id":"","url":"https://api.github.com/users/SeiferTim","html_url":"https://github.com/SeiferTim","followers_url":"https://api.github.com/users/SeiferTim/followers","following_url":"https://api.github.com/users/SeiferTim/following{/other_user}","gists_url":"https://api.github.com/users/SeiferTim/gists{/gist_id}","starred_url":"https://api.github.com/users/SeiferTim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SeiferTim/subscriptions","organizations_url":"https://api.github.com/users/SeiferTim/orgs","repos_url":"https://api.github.com/users/SeiferTim/repos","events_url":"https://api.github.com/users/SeiferTim/events{/privacy}","received_events_url":"https://api.github.com/users/SeiferTim/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T14:20:10Z","updated_at":"2015-06-30T14:20:10Z","body":"I had a thought about this... why restrict it to 'screen' centering?\r\nWhy not add a function to FlxObject called 'align', you pass it a FlxObject and an array of alignment types? (Left, Right, Top, Bottom, Center-X, Center-Y)\r\nSo, if you want to align an object to ANY other object (including a `FlxState`), you might say:\r\n`object.align(FlxG.currentState, [Align.LEFT, Align.CENTER_Y])`\r\nThoughts?"}}