Skip to content

Conversation

@JaskRendix
Copy link
Contributor

PR introduces enhancements to the pytmx SDL2 image loader integration for use with pygame._sdl2. The changes are summarized as follows:

  • added colorkey support: the image loader now accepts a colorkey to handle transparency. Supports hex strings (with or without #) and RGB(A) tuples
  • improved type hinting: added explicit type annotations using ColorLike, PointLike, and Callable from pytmx.pytmx for improved clarity and compatibility
  • refactored dataclasses: used @dataclass from dataclasses instead of mixing with dataclasses.dataclass to streamline code style
  • colorkey validation with error handling: ensures invalid colorkeys are flagged with descriptive logging and a ValueError
  • simplified imports and cleanup: reorganized imports and removed unused symbols to keep the loader tight and readable

@JaskRendix JaskRendix closed this Oct 5, 2025
@JaskRendix JaskRendix deleted the pygame-sdl2 branch October 15, 2025 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant