tcod 21.0.0__tar.gz → 21.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tcod-21.0.0 → tcod-21.2.0}/CHANGELOG.md +20 -0
- {tcod-21.0.0 → tcod-21.2.0}/PKG-INFO +1 -1
- {tcod-21.0.0 → tcod-21.2.0}/tcod/context.py +4 -3
- {tcod-21.0.0 → tcod-21.2.0}/tcod/event.py +94 -21
- {tcod-21.0.0 → tcod-21.2.0}/tcod/version.py +3 -3
- {tcod-21.0.0 → tcod-21.2.0}/tcod.egg-info/PKG-INFO +1 -1
- {tcod-21.0.0 → tcod-21.2.0}/CONTRIBUTING.md +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/LICENSE.txt +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/MANIFEST.in +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/README.rst +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/build_libtcod.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/build_sdl.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/CHANGELOG.md +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/CMakeLists.txt +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/CONTRIBUTING.md +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/LIBTCOD-CREDITS.txt +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/LICENSE.txt +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/README.md +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/bresenham.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/bresenham_c.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/bsp.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/bsp_c.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/color.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/color.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/config.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/console.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/console.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/console_drawing.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/console_drawing.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/console_etc.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/console_etc.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/console_init.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/console_init.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/console_printing.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/console_printing.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/console_rexpaint.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/console_rexpaint.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/console_types.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/context.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/context.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/context_init.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/context_init.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/context_viewport.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/context_viewport.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/error.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/error.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/fov.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/fov_c.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/fov_circular_raycasting.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/fov_diamond_raycasting.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/fov_permissive2.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/fov_recursive_shadowcasting.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/fov_restrictive.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/fov_symmetric_shadowcast.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/fov_types.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/globals.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/globals.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/heapq.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/heapq.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/heightmap.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/heightmap_c.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/image.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/image_c.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/lex.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/lex_c.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/libtcod.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/libtcod_int.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/list.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/list_c.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/logging.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/logging.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/mersenne.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/mersenne_c.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/mersenne_types.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/mouse.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/mouse_types.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/namegen.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/namegen_c.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/noise.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/noise_c.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/noise_defaults.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/parser.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/parser_c.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/path.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/path_c.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/pathfinder.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/pathfinder.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/pathfinder_frontier.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/pathfinder_frontier.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/portability.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/random.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/random.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/renderer_sdl2.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/renderer_sdl2.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/renderer_xterm.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/renderer_xterm.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/sdl2/console_grid.glslf +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/sdl2/console_grid.glslv +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/sdl2/event.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/sys.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/sys_c.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/sys_sdl_c.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/sys_sdl_img_bmp.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/sys_sdl_img_png.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/tileset.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/tileset.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/tileset_bdf.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/tileset_bdf.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/tileset_fallback.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/tileset_fallback.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/tileset_render.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/tileset_render.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/tileset_truetype.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/tileset_truetype.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/timer.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/tree.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/tree_c.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/txtfield.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/txtfield_c.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/utility.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/version.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/wrappers.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/wrappers.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/zip.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod/zip_c.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/libtcod_c.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/khrplatform.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/lodepng.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/lodepng.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/stb.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/stb_ds.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/stb_truetype.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/utf8proc/utf8proc.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/utf8proc/utf8proc.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/utf8proc/utf8proc_data.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/adler32.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/compress.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/crc32.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/crc32.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/deflate.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/deflate.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/gzclose.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/gzguts.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/gzlib.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/gzread.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/gzwrite.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/infback.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/inffast.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/inffast.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/inffixed.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/inflate.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/inflate.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/inftrees.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/inftrees.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/trees.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/trees.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/uncompr.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/zconf.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/zlib.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/zutil.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/zutil.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/libtcodpy.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/pyproject.toml +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/requirements.txt +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/setup.cfg +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/setup.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/__init__.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/__pyinstaller/__init__.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/__pyinstaller/hook-tcod.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/_internal.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/_libtcod.pyi +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/bsp.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/cdef.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/cffi.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/cffi.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/color.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/console.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/constants.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/event_constants.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/image.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/libtcodpy.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/los.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/map.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/noise.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/noise.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/noise.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/path.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/path.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/path.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/py.typed +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/random.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/random.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/render.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/sdl/__init__.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/sdl/_internal.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/sdl/audio.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/sdl/constants.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/sdl/joystick.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/sdl/mouse.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/sdl/render.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/sdl/sys.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/sdl/video.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/tcod.c +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/tcod.h +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/tcod.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod/tileset.py +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod.egg-info/SOURCES.txt +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod.egg-info/dependency_links.txt +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod.egg-info/entry_points.txt +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod.egg-info/requires.txt +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tcod.egg-info/top_level.txt +0 -0
- {tcod-21.0.0 → tcod-21.2.0}/tox.ini +0 -0
|
@@ -6,6 +6,26 @@ This project adheres to [Semantic Versioning](https://semver.org/) since version
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [21.2.0] - 2026-04-04
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `tcod.event.MouseWheel` now has `which`, `window_id`, `position` and `integer_position` attributes.
|
|
14
|
+
|
|
15
|
+
## Fixed
|
|
16
|
+
|
|
17
|
+
- `tcod.event.convert_coordinates_from_window` was not converting all types of mouse events.
|
|
18
|
+
|
|
19
|
+
## [21.1.0] - 2026-04-04
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- `MouseButtonEvent.integer_position` property.
|
|
24
|
+
|
|
25
|
+
## Fixed
|
|
26
|
+
|
|
27
|
+
- `integer_position` was missing from mouse button events.
|
|
28
|
+
|
|
9
29
|
## [21.0.0] - 2026-03-13
|
|
10
30
|
|
|
11
31
|
### Added
|
|
@@ -255,10 +255,11 @@ class Context:
|
|
|
255
255
|
Now returns a new event with the coordinates converted into tiles.
|
|
256
256
|
"""
|
|
257
257
|
event_copy = copy.copy(event)
|
|
258
|
-
if isinstance(event,
|
|
259
|
-
assert isinstance(event_copy,
|
|
258
|
+
if isinstance(event, tcod.event._MouseEventWithPosition):
|
|
259
|
+
assert isinstance(event_copy, tcod.event._MouseEventWithPosition)
|
|
260
260
|
event_copy.position = tcod.event.Point(*self.pixel_to_tile(event.position[0], event.position[1]))
|
|
261
|
-
event
|
|
261
|
+
if isinstance(event, tcod.event._MouseEventWithTile):
|
|
262
|
+
event._tile = tcod.event.Point(floor(event_copy.position[0]), floor(event_copy.position[1]))
|
|
262
263
|
if isinstance(event, tcod.event.MouseMotion):
|
|
263
264
|
assert isinstance(event_copy, tcod.event.MouseMotion)
|
|
264
265
|
assert event._tile is not None
|
|
@@ -27,21 +27,19 @@ Example::
|
|
|
27
27
|
while True:
|
|
28
28
|
console = context.new_console()
|
|
29
29
|
context.present(console, integer_scaling=True)
|
|
30
|
-
for
|
|
31
|
-
context.convert_event(
|
|
30
|
+
for pixel_event in tcod.event.wait():
|
|
31
|
+
event = context.convert_event(pixel_event) # Convert mouse pixel coordinates to tile coordinates
|
|
32
|
+
print(event) # Print all events, for learning and debugging
|
|
32
33
|
if isinstance(event, tcod.event.Quit):
|
|
33
|
-
print(event)
|
|
34
34
|
raise SystemExit()
|
|
35
35
|
elif isinstance(event, tcod.event.KeyDown):
|
|
36
|
-
print(event) #
|
|
36
|
+
print(f"{event.sym=}, {event.scancode=}") # Show Scancode and KeySym enum names
|
|
37
37
|
if event.sym in KEY_COMMANDS:
|
|
38
38
|
print(f"Command: {KEY_COMMANDS[event.sym]}")
|
|
39
39
|
elif isinstance(event, tcod.event.MouseButtonDown):
|
|
40
|
-
print(event) #
|
|
40
|
+
print(f"{event.button=}, {event.integer_position=}") # Show mouse button and tile
|
|
41
41
|
elif isinstance(event, tcod.event.MouseMotion):
|
|
42
|
-
print(event) #
|
|
43
|
-
else:
|
|
44
|
-
print(event) # Print any unhandled events.
|
|
42
|
+
print(f"{event.integer_position=}, {event.integer_motion=}") # Current mouse tile and tile motion
|
|
45
43
|
|
|
46
44
|
Python 3.10 introduced `match statements <https://docs.python.org/3/tutorial/controlflow.html#match-statements>`_
|
|
47
45
|
which can be used to dispatch events more gracefully:
|
|
@@ -61,8 +59,8 @@ Example::
|
|
|
61
59
|
while True:
|
|
62
60
|
console = context.new_console()
|
|
63
61
|
context.present(console, integer_scaling=True)
|
|
64
|
-
for
|
|
65
|
-
context.convert_event(
|
|
62
|
+
for pixel_event in tcod.event.wait():
|
|
63
|
+
event = context.convert_event(pixel_event) # Converts mouse pixel coordinates to tile coordinates.
|
|
66
64
|
match event:
|
|
67
65
|
case tcod.event.Quit():
|
|
68
66
|
raise SystemExit()
|
|
@@ -70,12 +68,14 @@ Example::
|
|
|
70
68
|
print(f"Command: {KEY_COMMANDS[sym]}")
|
|
71
69
|
case tcod.event.KeyDown(sym=sym, scancode=scancode, mod=mod, repeat=repeat):
|
|
72
70
|
print(f"KeyDown: {sym=}, {scancode=}, {mod=}, {repeat=}")
|
|
73
|
-
case tcod.event.MouseButtonDown(button=button,
|
|
74
|
-
print(f"MouseButtonDown: {button=}, {
|
|
75
|
-
case tcod.event.MouseMotion(
|
|
76
|
-
|
|
71
|
+
case tcod.event.MouseButtonDown(button=button, integer_position=tile):
|
|
72
|
+
print(f"MouseButtonDown: {button=}, {tile=}")
|
|
73
|
+
case tcod.event.MouseMotion(integer_position=tile, integer_motion=tile_motion):
|
|
74
|
+
assert isinstance(pixel_event, tcod.event.MouseMotion)
|
|
75
|
+
pixel_motion = pixel_event.motion
|
|
76
|
+
print(f"MouseMotion: {pixel_motion=}, {tile=}, {tile_motion=}")
|
|
77
77
|
case tcod.event.Event() as event:
|
|
78
|
-
print(event) #
|
|
78
|
+
print(event) # Print unhandled events
|
|
79
79
|
|
|
80
80
|
.. versionadded:: 8.4
|
|
81
81
|
"""
|
|
@@ -89,7 +89,20 @@ import warnings
|
|
|
89
89
|
from collections.abc import Callable, Iterator, Mapping
|
|
90
90
|
from math import floor
|
|
91
91
|
from pathlib import Path
|
|
92
|
-
from typing import
|
|
92
|
+
from typing import (
|
|
93
|
+
TYPE_CHECKING,
|
|
94
|
+
Any,
|
|
95
|
+
Final,
|
|
96
|
+
Generic,
|
|
97
|
+
Literal,
|
|
98
|
+
NamedTuple,
|
|
99
|
+
Protocol,
|
|
100
|
+
TypeAlias,
|
|
101
|
+
TypedDict,
|
|
102
|
+
TypeVar,
|
|
103
|
+
overload,
|
|
104
|
+
runtime_checkable,
|
|
105
|
+
)
|
|
93
106
|
|
|
94
107
|
import attrs
|
|
95
108
|
import numpy as np
|
|
@@ -630,7 +643,7 @@ class MouseButtonEvent(Event):
|
|
|
630
643
|
"""
|
|
631
644
|
|
|
632
645
|
position: Point[float] = attrs.field(default=Point(0.0, 0.0))
|
|
633
|
-
"""The
|
|
646
|
+
"""The coordinates of the mouse."""
|
|
634
647
|
_tile: Point[int] | None = attrs.field(default=Point(0, 0), alias="tile")
|
|
635
648
|
"""The tile integer coordinates of the mouse on the screen. Deprecated."""
|
|
636
649
|
button: MouseButton
|
|
@@ -652,6 +665,15 @@ class MouseButtonEvent(Event):
|
|
|
652
665
|
.. versionadded:: 21.0
|
|
653
666
|
"""
|
|
654
667
|
|
|
668
|
+
@property
|
|
669
|
+
def integer_position(self) -> Point[int]:
|
|
670
|
+
"""Integer coordinates of this event.
|
|
671
|
+
|
|
672
|
+
.. versionadded:: 21.1
|
|
673
|
+
"""
|
|
674
|
+
x, y = self.position
|
|
675
|
+
return Point(floor(x), floor(y))
|
|
676
|
+
|
|
655
677
|
@classmethod
|
|
656
678
|
def _from_sdl_event(cls, sdl_event: _C_SDL_Event) -> Self:
|
|
657
679
|
button = sdl_event.button
|
|
@@ -700,13 +722,63 @@ class MouseWheel(Event):
|
|
|
700
722
|
"""Vertical scrolling. A positive value means scrolling away from the user."""
|
|
701
723
|
flipped: bool
|
|
702
724
|
"""If True then the values of `x` and `y` are the opposite of their usual values.
|
|
703
|
-
This depends on the
|
|
725
|
+
This depends on the operating system settings.
|
|
704
726
|
"""
|
|
705
727
|
|
|
728
|
+
position: Point[float] = attrs.field(default=Point(0.0, 0.0))
|
|
729
|
+
"""Coordinates of the mouse for this event.
|
|
730
|
+
|
|
731
|
+
.. versionadded:: 21.2
|
|
732
|
+
"""
|
|
733
|
+
|
|
734
|
+
which: int = 0
|
|
735
|
+
"""Mouse device ID for this event.
|
|
736
|
+
|
|
737
|
+
.. versionadded:: 21.2
|
|
738
|
+
"""
|
|
739
|
+
|
|
740
|
+
window_id: int = 0
|
|
741
|
+
"""Window ID with mouse focus.
|
|
742
|
+
|
|
743
|
+
.. versionadded:: 21.2
|
|
744
|
+
"""
|
|
745
|
+
|
|
746
|
+
@property
|
|
747
|
+
def integer_position(self) -> Point[int]:
|
|
748
|
+
"""Integer coordinates of this event.
|
|
749
|
+
|
|
750
|
+
.. versionadded:: 21.2
|
|
751
|
+
"""
|
|
752
|
+
x, y = self.position
|
|
753
|
+
return Point(floor(x), floor(y))
|
|
754
|
+
|
|
706
755
|
@classmethod
|
|
707
756
|
def _from_sdl_event(cls, sdl_event: _C_SDL_Event) -> Self:
|
|
708
757
|
wheel = sdl_event.wheel
|
|
709
|
-
return cls(
|
|
758
|
+
return cls(
|
|
759
|
+
x=int(wheel.integer_x),
|
|
760
|
+
y=int(wheel.integer_y),
|
|
761
|
+
flipped=bool(wheel.direction),
|
|
762
|
+
position=Point(float(wheel.mouse_x), float(wheel.mouse_y)),
|
|
763
|
+
which=int(wheel.which),
|
|
764
|
+
window_id=int(wheel.windowID),
|
|
765
|
+
**_unpack_sdl_event(sdl_event),
|
|
766
|
+
)
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
@runtime_checkable
|
|
770
|
+
class _MouseEventWithPosition(Protocol):
|
|
771
|
+
"""Mouse event with position. Used internally to handle conversions."""
|
|
772
|
+
|
|
773
|
+
position: Point[float]
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
@runtime_checkable
|
|
777
|
+
class _MouseEventWithTile(Protocol):
|
|
778
|
+
"""Mouse event with position and deprecated tile attribute. Used internally to handle conversions."""
|
|
779
|
+
|
|
780
|
+
position: Point[float]
|
|
781
|
+
_tile: Point[int] | None
|
|
710
782
|
|
|
711
783
|
|
|
712
784
|
@attrs.define(slots=True, kw_only=True)
|
|
@@ -1733,9 +1805,10 @@ def convert_coordinates_from_window(
|
|
|
1733
1805
|
event._tile_motion = Point(
|
|
1734
1806
|
floor(position[0]) - floor(previous_position[0]), floor(position[1]) - floor(previous_position[1])
|
|
1735
1807
|
)
|
|
1736
|
-
|
|
1808
|
+
elif isinstance(event, _MouseEventWithPosition):
|
|
1737
1809
|
event.position = Point(*convert_coordinates_from_window(event.position, context, console, dest_rect))
|
|
1738
|
-
|
|
1810
|
+
if isinstance(event, _MouseEventWithTile):
|
|
1811
|
+
event._tile = Point(floor(event.position[0]), floor(event.position[1]))
|
|
1739
1812
|
return event
|
|
1740
1813
|
|
|
1741
1814
|
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '21.
|
|
22
|
-
__version_tuple__ = version_tuple = (21,
|
|
21
|
+
__version__ = version = '21.2.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (21, 2, 0)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'gc3fde2460'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|