{"action":"created","issue":{"url":"https://api.github.com/repos/SFML/SFML/issues/827","labels_url":"https://api.github.com/repos/SFML/SFML/issues/827/labels{/name}","comments_url":"https://api.github.com/repos/SFML/SFML/issues/827/comments","events_url":"https://api.github.com/repos/SFML/SFML/issues/827/events","html_url":"https://github.com/SFML/SFML/pull/827","id":61757325,"number":827,"title":"Added methods to set the cursor type/image","user":{"login":"binary1248","id":949359,"avatar_url":"https://avatars.githubusercontent.com/u/949359?v=3","gravatar_id":"","url":"https://api.github.com/users/binary1248","html_url":"https://github.com/binary1248","followers_url":"https://api.github.com/users/binary1248/followers","following_url":"https://api.github.com/users/binary1248/following{/other_user}","gists_url":"https://api.github.com/users/binary1248/gists{/gist_id}","starred_url":"https://api.github.com/users/binary1248/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binary1248/subscriptions","organizations_url":"https://api.github.com/users/binary1248/orgs","repos_url":"https://api.github.com/users/binary1248/repos","events_url":"https://api.github.com/users/binary1248/events{/privacy}","received_events_url":"https://api.github.com/users/binary1248/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/SFML/SFML/labels/feature","name":"feature","color":"23BA35"},{"url":"https://api.github.com/repos/SFML/SFML/labels/m:sfml-window","name":"m:sfml-window","color":"cccccc"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/SFML/SFML/milestones/10","html_url":"https://github.com/SFML/SFML/milestones/2.4","labels_url":"https://api.github.com/repos/SFML/SFML/milestones/10/labels","id":1043773,"number":10,"title":"2.4","description":"","creator":{"login":"eXpl0it3r","id":920861,"avatar_url":"https://avatars.githubusercontent.com/u/920861?v=3","gravatar_id":"","url":"https://api.github.com/users/eXpl0it3r","html_url":"https://github.com/eXpl0it3r","followers_url":"https://api.github.com/users/eXpl0it3r/followers","following_url":"https://api.github.com/users/eXpl0it3r/following{/other_user}","gists_url":"https://api.github.com/users/eXpl0it3r/gists{/gist_id}","starred_url":"https://api.github.com/users/eXpl0it3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eXpl0it3r/subscriptions","organizations_url":"https://api.github.com/users/eXpl0it3r/orgs","repos_url":"https://api.github.com/users/eXpl0it3r/repos","events_url":"https://api.github.com/users/eXpl0it3r/events{/privacy}","received_events_url":"https://api.github.com/users/eXpl0it3r/received_events","type":"User","site_admin":false},"open_issues":30,"closed_issues":4,"state":"open","created_at":"2015-03-29T21:47:10Z","updated_at":"2015-09-19T13:31:32Z","due_on":null,"closed_at":null},"comments":34,"created_at":"2015-03-15T05:52:10Z","updated_at":"2015-09-20T15:59:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/SFML/SFML/pulls/827","html_url":"https://github.com/SFML/SFML/pull/827","diff_url":"https://github.com/SFML/SFML/pull/827.diff","patch_url":"https://github.com/SFML/SFML/pull/827.patch"},"body":"Supersedes #784.\r\n\r\nThanks to @fundies for the initial draft implementation. I originally wanted to attribute the commit to him, but there were simply too many changes in the end.\r\n\r\nResource leaks should be gone now, and general code style is fixed up. Like #784, this is still missing the OS X implementation. Hopefully @mantognini or someone else can fill in the gaps [here](https://github.com/LaurentGomila/SFML/blob/e9123604924436e762351472c821309557e73fd0/src/SFML/Window/OSX/WindowImplCocoa.mm#L548) and [here](https://github.com/LaurentGomila/SFML/blob/e9123604924436e762351472c821309557e73fd0/src/SFML/Window/OSX/WindowImplCocoa.mm#L555). It can't be nearly as horrible as the Windows or Unix implementations. :stuck_out_tongue: [This](http://en.sfml-dev.org/forums/index.php?topic=8313.msg57036#msg57036) might help a bit.\r\n\r\nThis implements #269."},"comment":{"url":"https://api.github.com/repos/SFML/SFML/issues/comments/141800752","html_url":"https://github.com/SFML/SFML/pull/827#issuecomment-141800752","issue_url":"https://api.github.com/repos/SFML/SFML/issues/827","id":141800752,"user":{"login":"binary1248","id":949359,"avatar_url":"https://avatars.githubusercontent.com/u/949359?v=3","gravatar_id":"","url":"https://api.github.com/users/binary1248","html_url":"https://github.com/binary1248","followers_url":"https://api.github.com/users/binary1248/followers","following_url":"https://api.github.com/users/binary1248/following{/other_user}","gists_url":"https://api.github.com/users/binary1248/gists{/gist_id}","starred_url":"https://api.github.com/users/binary1248/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binary1248/subscriptions","organizations_url":"https://api.github.com/users/binary1248/orgs","repos_url":"https://api.github.com/users/binary1248/repos","events_url":"https://api.github.com/users/binary1248/events{/privacy}","received_events_url":"https://api.github.com/users/binary1248/received_events","type":"User","site_admin":false},"created_at":"2015-09-20T15:59:28Z","updated_at":"2015-09-20T15:59:28Z","body":"> Does a sf::Cursor object directly prepare the data upon construction, and thus save only the \"prepared data\", or would it be lazily prepared the first time Window::setMouseCursor() is called with it as an argument?\r\n\r\nThere is no benefit to lazy initialization. Cursor objects are like textures, you will probably use them very often and would rather have predictable loading points than having your application hitch the first time you change to that cursor.\r\n\r\n> Can the same cursor object be rebound to multiple windows, or is per-window state necessary?\r\n\r\nJust like any other pure data container, prepared cursors can be used by multiple windows simultaneously. They will track their own lifetime and destroy the resource both on the application and OS side when necessary. This also means that they are susceptible to the same issue as textures when they are destroyed before the sprite that makes use of them, however this can be easily fixed in the future when we introduce shared ownership semantics."}}