PySDL 0.9.15
A new PySDL2 to go with the new year! The bindings have been updated to wrap the new functions and constants added in SDL 2.26.0, a few bugs have been fixed, and various improvements have been made to sdl2.ext
.
Apart from SDL 2.26.0 support, the biggest change is the addition of a new sdl2.ext
module (ext.mouse
) that provides a friendly Pythonic API for working with the mouse in PySDL2. You can now get and set the cursor position without ctypes
pointers, and check the state of the mouse buttons without using a bit mask! Additionally, the sdl2.ext.Point
and sdl2.ext.Rect
classes now support Pythonic unpacking (e.g. x, y, w, h = sdl_rect
), making them a bit nicer to work with.
Changelog
- Updated to wrap new functions and constants in SDL 2.26.0.
- Added a new module
sdl2.ext.mouse
for showing/hiding/moving/retrieving the mouse cursor and querying the current state of the mouse buttons. - Added indexing/unpacking support to the
sdl2.ext.Point
andsdl2.ext.Rect
classes and their float equivalents. - Updated
sdl2.ext.SpriteFactory.from_image()
to allow passingPIL.Image.Image
objects directly. - Improved
sdl2.ext.Texture
performance. - Fixed a bug preventing SDL Points and Rects from being used as
srcrect
ordstrect
forsdl2.ext.Renderer.copy()
. - Added a binding for
SDL_ResetHint
, which was added in SDL 2.24.0 but got missed in PR #246.