Skip to content

Commit 37dccba

Browse files
committed
Document mouse coordinates changed to float in tcod 19.0
1 parent bb4013b commit 37dccba

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tcod/event.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ class Point(NamedTuple):
156156
157157
.. seealso::
158158
:any:`MouseMotion` :any:`MouseButtonDown` :any:`MouseButtonUp`
159+
160+
.. versionchanged:: 19.0
161+
Now uses floating point coordinates due to the port to SDL3.
159162
"""
160163

161164
x: float
@@ -481,6 +484,9 @@ class MouseMotion(MouseState):
481484
.. versionchanged:: 15.0
482485
Renamed `pixel` attribute to `position`.
483486
Renamed `pixel_motion` attribute to `motion`.
487+
488+
.. versionchanged:: 19.0
489+
`position` and `motion` now use floating point coordinates.
484490
"""
485491

486492
def __init__(
@@ -558,7 +564,7 @@ class MouseButtonEvent(MouseState):
558564
type (str): Will be "MOUSEBUTTONDOWN" or "MOUSEBUTTONUP",
559565
depending on the event.
560566
position (Point): The pixel coordinates of the mouse.
561-
tile (Point): The integer tile coordinates of the mouse on the screen.
567+
tile (Point): The tile coordinates of the mouse on the screen.
562568
button (int): Which mouse button.
563569
564570
This will be one of the following names:
@@ -569,6 +575,8 @@ class MouseButtonEvent(MouseState):
569575
* tcod.event.BUTTON_X1
570576
* tcod.event.BUTTON_X2
571577
578+
.. versionchanged:: 19.0
579+
`position` and `tile` now use floating point coordinates.
572580
"""
573581

574582
def __init__(

0 commit comments

Comments
 (0)