bastienleonard / pysfml-cython

A Python 2/3 binding for SFML 2, written with Cython
http://pysfml2-cython.readthedocs.org/
Other
68 stars 8 forks source link

sfml.RenderWindow.cursor_position does not exist #27

Closed krychu closed 12 years ago

krychu commented 12 years ago

Hi, sfml.RenderWindow.cursor_position appears in docs (http://pysfml2-cython.readthedocs.org/en/latest/graphics.html#sfml.RenderWindow.cursor_position) but in code I get: AttributeError: 'sfml.RenderWindow' object has no attribute 'cursor_position'.

I'm porting a project from pysfml1 to pysfml2 and part of the project relies on manipulating cursor position. I did some search but could not find any other way to change cursor position.

Thanks, ks

krychu commented 12 years ago

sf.Mouse.set_position seems to do just that. It would be nice to have 'mouse_cursor_visible' and cursor position in the same class as they are highly related. But I guess this is more of a comment for sfml rather than pysfml.

Cheers

bastienleonard commented 12 years ago

Thanks, I probably didn't notice that the attribute was gone when updating the documentation. I also cleaned up some other stuff: RenderWindow.width and RenderWindow.height can now be modified, like RenderWindow.width.

The rationale for having mouse_cursor_visible in RenderWindow is probably that the Mouse class shouldn't care about what appears on windows.

krychu commented 12 years ago

thanks