tcod 21.1.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.1.0 → tcod-21.2.0}/CHANGELOG.md +10 -0
- {tcod-21.1.0 → tcod-21.2.0}/PKG-INFO +1 -1
- {tcod-21.1.0 → tcod-21.2.0}/tcod/context.py +4 -3
- {tcod-21.1.0 → tcod-21.2.0}/tcod/event.py +70 -6
- {tcod-21.1.0 → tcod-21.2.0}/tcod/version.py +3 -3
- {tcod-21.1.0 → tcod-21.2.0}/tcod.egg-info/PKG-INFO +1 -1
- {tcod-21.1.0 → tcod-21.2.0}/CONTRIBUTING.md +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/LICENSE.txt +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/MANIFEST.in +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/README.rst +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/build_libtcod.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/build_sdl.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/CHANGELOG.md +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/CMakeLists.txt +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/CONTRIBUTING.md +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/LIBTCOD-CREDITS.txt +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/LICENSE.txt +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/README.md +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/bresenham.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/bresenham_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/bsp.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/bsp_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/color.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/color.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/config.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/console.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/console.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/console_drawing.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/console_drawing.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/console_etc.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/console_etc.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/console_init.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/console_init.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/console_printing.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/console_printing.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/console_rexpaint.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/console_rexpaint.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/console_types.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/context.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/context.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/context_init.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/context_init.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/context_viewport.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/context_viewport.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/error.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/error.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/fov.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/fov_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/fov_circular_raycasting.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/fov_diamond_raycasting.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/fov_permissive2.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/fov_recursive_shadowcasting.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/fov_restrictive.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/fov_symmetric_shadowcast.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/fov_types.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/globals.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/globals.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/heapq.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/heapq.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/heightmap.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/heightmap_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/image.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/image_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/lex.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/lex_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/libtcod.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/libtcod_int.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/list.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/list_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/logging.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/logging.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/mersenne.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/mersenne_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/mersenne_types.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/mouse.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/mouse_types.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/namegen.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/namegen_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/noise.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/noise_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/noise_defaults.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/parser.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/parser_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/path.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/path_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/pathfinder.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/pathfinder.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/pathfinder_frontier.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/pathfinder_frontier.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/portability.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/random.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/random.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/renderer_sdl2.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/renderer_sdl2.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/renderer_xterm.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/renderer_xterm.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/sdl2/console_grid.glslf +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/sdl2/console_grid.glslv +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/sdl2/event.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/sys.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/sys_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/sys_sdl_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/sys_sdl_img_bmp.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/sys_sdl_img_png.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/tileset.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/tileset.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/tileset_bdf.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/tileset_bdf.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/tileset_fallback.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/tileset_fallback.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/tileset_render.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/tileset_render.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/tileset_truetype.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/tileset_truetype.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/timer.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/tree.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/tree_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/txtfield.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/txtfield_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/utility.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/version.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/wrappers.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/wrappers.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/zip.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod/zip_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/libtcod_c.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/khrplatform.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/lodepng.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/lodepng.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/stb.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/stb_ds.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/stb_truetype.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/utf8proc/utf8proc.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/utf8proc/utf8proc.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/utf8proc/utf8proc_data.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/adler32.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/compress.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/crc32.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/crc32.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/deflate.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/deflate.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/gzclose.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/gzguts.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/gzlib.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/gzread.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/gzwrite.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/infback.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/inffast.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/inffast.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/inffixed.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/inflate.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/inflate.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/inftrees.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/inftrees.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/trees.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/trees.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/uncompr.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/zconf.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/zlib.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/zutil.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcod/src/vendor/zlib/zutil.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/libtcodpy.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/pyproject.toml +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/requirements.txt +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/setup.cfg +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/setup.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/__init__.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/__pyinstaller/__init__.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/__pyinstaller/hook-tcod.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/_internal.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/_libtcod.pyi +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/bsp.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/cdef.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/cffi.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/cffi.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/color.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/console.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/constants.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/event_constants.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/image.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/libtcodpy.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/los.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/map.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/noise.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/noise.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/noise.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/path.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/path.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/path.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/py.typed +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/random.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/random.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/render.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/sdl/__init__.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/sdl/_internal.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/sdl/audio.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/sdl/constants.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/sdl/joystick.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/sdl/mouse.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/sdl/render.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/sdl/sys.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/sdl/video.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/tcod.c +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/tcod.h +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/tcod.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod/tileset.py +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod.egg-info/SOURCES.txt +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod.egg-info/dependency_links.txt +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod.egg-info/entry_points.txt +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod.egg-info/requires.txt +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tcod.egg-info/top_level.txt +0 -0
- {tcod-21.1.0 → tcod-21.2.0}/tox.ini +0 -0
|
@@ -6,6 +6,16 @@ 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
|
+
|
|
9
19
|
## [21.1.0] - 2026-04-04
|
|
10
20
|
|
|
11
21
|
### 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
|
|
@@ -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
|
|
@@ -709,13 +722,63 @@ class MouseWheel(Event):
|
|
|
709
722
|
"""Vertical scrolling. A positive value means scrolling away from the user."""
|
|
710
723
|
flipped: bool
|
|
711
724
|
"""If True then the values of `x` and `y` are the opposite of their usual values.
|
|
712
|
-
This depends on the
|
|
725
|
+
This depends on the operating system settings.
|
|
726
|
+
"""
|
|
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
|
|
713
744
|
"""
|
|
714
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
|
+
|
|
715
755
|
@classmethod
|
|
716
756
|
def _from_sdl_event(cls, sdl_event: _C_SDL_Event) -> Self:
|
|
717
757
|
wheel = sdl_event.wheel
|
|
718
|
-
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
|
|
719
782
|
|
|
720
783
|
|
|
721
784
|
@attrs.define(slots=True, kw_only=True)
|
|
@@ -1742,9 +1805,10 @@ def convert_coordinates_from_window(
|
|
|
1742
1805
|
event._tile_motion = Point(
|
|
1743
1806
|
floor(position[0]) - floor(previous_position[0]), floor(position[1]) - floor(previous_position[1])
|
|
1744
1807
|
)
|
|
1745
|
-
|
|
1808
|
+
elif isinstance(event, _MouseEventWithPosition):
|
|
1746
1809
|
event.position = Point(*convert_coordinates_from_window(event.position, context, console, dest_rect))
|
|
1747
|
-
|
|
1810
|
+
if isinstance(event, _MouseEventWithTile):
|
|
1811
|
+
event._tile = Point(floor(event.position[0]), floor(event.position[1]))
|
|
1748
1812
|
return event
|
|
1749
1813
|
|
|
1750
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
|