From 65ec5b9a705aeced7bd50b53779848e392f03846 Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Wed, 4 Jan 2023 13:14:16 -0800 Subject: [PATCH] Prepare 15.0.0 release. --- CHANGELOG.md | 9 ++++++++- tcod/context.py | 2 +- tcod/event.py | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95120c50..591b7289 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,16 @@ Changes relevant to the users of python-tcod are documented here. This project adheres to [Semantic Versioning](https://semver.org/) since version `2.0.0`. ## [Unreleased] + +## [15.0.0] - 2023-01-04 ### Changed -- Updated the case of window event types to match their type annotations. +- Modified the letter case of window event types to match their type annotations. This may cause regressions. Run Mypy to check for ``[comparison-overlap]`` errors. +- Mouse event attributes have been changed ``.pixel -> .position`` and ``.pixel_motion -> .motion``. +- `Context.convert_event` now returns copies of events with mouse coordinates converted into tile positions. + +### Deprecated +- Mouse event pixel and tile attributes have been deprecated. ## [14.0.0] - 2022-12-09 ### Added diff --git a/tcod/context.py b/tcod/context.py index 414f1bd2..cc82c90f 100644 --- a/tcod/context.py +++ b/tcod/context.py @@ -265,7 +265,7 @@ def convert_event(self, event: _Event) -> _Event: # Tile coordinates are used in the returned event. print(f"Tiles: {event_tile.position=}, {event_tile.motion=}") - .. versionchanged:: Unreleased + .. versionchanged:: 15.0 Now returns a new event with the coordinates converted into tiles. """ event_copy = copy.copy(event) diff --git a/tcod/event.py b/tcod/event.py index 58ca9bac..a54eeb61 100644 --- a/tcod/event.py +++ b/tcod/event.py @@ -398,7 +398,7 @@ class MouseState(Event): .. versionadded:: 9.3 - .. versionchanged:: Unreleased + .. versionchanged:: 15.0 Renamed `pixel` attribute to `position`. """ @@ -484,7 +484,7 @@ class MouseMotion(MouseState): * tcod.event.BUTTON_X1MASK * tcod.event.BUTTON_X2MASK - .. versionchanged:: Unreleased + .. versionchanged:: 15.0 Renamed `pixel` attribute to `position`. Renamed `pixel_motion` attribute to `motion`. """