Skip to content

Version 0.7.0

Released May 17th, 2025

Breaking Changes

  • position and size attributes removed from UI elements - Use internal rect instead.
  • UI element changes:
    1. Had set_pixel_position, set_pixel_size, set_scaled_position, and set_scaled_size replaced with set_pixel_transform and set_scaled_transform:
      • Button, Frame, CheckboxInput, and TextInput.
  • checkedColor and uncheckedColor constructor parameters for CheckboxInput renamed to checked_color and unchecked_color to comply with convention.
  • textColor and yFlipped constructor parameters for TextInput renamed to text_color and y_flipped to comply with convention.
  • Button changes:
    1. scene parameter now required - New first positional argument.
    2. check_click and check_hover removed - Scene will handle these automatically.
  • CheckboxInput changes:
    1. scene parameter now required - New first positional argument.
    2. check_click removed - Scene will handle these automatically.
  • TextInput changes:
    1. scene parameter now required - New first positional argument.
    2. check_click and check_key removed - Scene will handle these automatically.
  • ColorRGB and ColorRGBA from_tuple renamed to from_iterable.
  • Scene.__init__ should no longer be manually defined (as we are removing old boilerplate like super()). Use on_init instead.
  • Scene.on_init now allows **kwargs to be passed from Engine.set_scene.

Additions

  • Scene on_render and on_update methods are no longer abstract - their implementation is again optional.
  • UI element rect attributes are now no longer only readable properties - they can be directly written (Also allows future tweening, if implemented).
  • ColorRGB and ColorRGBA:
    1. format() now supported for other color representation conversions.
    2. Get and set now supported via indices, i.e. color[0] or color[1] = ....
    3. Now hashable, so inserting into sets are supported.
    4. Supports iterations and being iterated over.
    5. New .copy() method.
    6. New .to_numpy() conversion.
    7. New .hex() color representation.
    8. New .int() color representation.
  • ColorRGB:
    1. Now supports comparisons with other ColorRGB objects or 3-length iterables.
    2. New .hsl() color representation.
    3. New .hsv() color representation.
  • ColorRGBA:
    1. Now supports comparisons with other ColorRGBA objects or 4-length iterables.
    2. New .hsla() color representation.
    3. New .hsva() color representation.
  • Tween:
    1. ColorRGB/A now supported.
  • New FPS/delta_time framework. Pygame's internal timing is unreliable.
  • __slots__ to all instantiable classes to decrease object memory and increase lookup speed (~10% increase in FPS).

Fixes

  • Docstrings and type annotations for UI elements with set_scaled_size called for IntVector2 rather than FloatVector2.
  • Scene event handler for WINDOWRESIZED event was dispatching an IntVector2 generated from non-existent size event attribute, rather than x and y.
  • Various docstring and type annotation fixes - Improved/clarified annotation types.
  • Dropped support for Engine.set_background taking a ColorRGBA object, as Pygame doesn't support window alpha values - The a value is now dropped.
  • Minor performance tweaks in heavily-executed loops and function calls.
  • Engine.set_update_interval expected Interval in the internal logic, but never accounted for when an int or float was passed.