tcod 21.0.0__tar.gz → 21.1.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.1.0}/CHANGELOG.md +10 -0
- {tcod-21.0.0 → tcod-21.1.0}/PKG-INFO +1 -1
- {tcod-21.0.0 → tcod-21.1.0}/tcod/context.py +2 -2
- {tcod-21.0.0 → tcod-21.1.0}/tcod/event.py +24 -15
- {tcod-21.0.0 → tcod-21.1.0}/tcod/version.py +3 -3
- {tcod-21.0.0 → tcod-21.1.0}/tcod.egg-info/PKG-INFO +1 -1
- {tcod-21.0.0 → tcod-21.1.0}/CONTRIBUTING.md +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/LICENSE.txt +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/MANIFEST.in +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/README.rst +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/build_libtcod.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/build_sdl.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/CHANGELOG.md +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/CMakeLists.txt +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/CONTRIBUTING.md +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/LIBTCOD-CREDITS.txt +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/LICENSE.txt +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/README.md +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/bresenham.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/bresenham_c.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/bsp.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/bsp_c.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/color.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/color.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/config.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/console.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/console.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/console_drawing.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/console_drawing.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/console_etc.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/console_etc.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/console_init.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/console_init.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/console_printing.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/console_printing.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/console_rexpaint.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/console_rexpaint.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/console_types.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/context.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/context.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/context_init.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/context_init.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/context_viewport.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/context_viewport.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/error.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/error.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/fov.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/fov_c.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/fov_circular_raycasting.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/fov_diamond_raycasting.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/fov_permissive2.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/fov_recursive_shadowcasting.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/fov_restrictive.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/fov_symmetric_shadowcast.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/fov_types.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/globals.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/globals.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/heapq.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/heapq.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/heightmap.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/heightmap_c.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/image.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/image_c.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/lex.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/lex_c.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/libtcod.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/libtcod_int.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/list.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/list_c.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/logging.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/logging.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/mersenne.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/mersenne_c.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/mersenne_types.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/mouse.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/mouse_types.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/namegen.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/namegen_c.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/noise.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/noise_c.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/noise_defaults.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/parser.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/parser_c.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/path.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/path_c.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/pathfinder.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/pathfinder.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/pathfinder_frontier.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/pathfinder_frontier.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/portability.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/random.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/random.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/renderer_sdl2.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/renderer_sdl2.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/renderer_xterm.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/renderer_xterm.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/sdl2/console_grid.glslf +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/sdl2/console_grid.glslv +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/sdl2/event.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/sys.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/sys_c.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/sys_sdl_c.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/sys_sdl_img_bmp.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/sys_sdl_img_png.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/tileset.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/tileset.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/tileset_bdf.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/tileset_bdf.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/tileset_fallback.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/tileset_fallback.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/tileset_render.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/tileset_render.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/tileset_truetype.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/tileset_truetype.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/timer.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/tree.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/tree_c.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/txtfield.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/txtfield_c.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/utility.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/version.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/wrappers.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/wrappers.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/zip.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod/zip_c.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/libtcod_c.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/khrplatform.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/lodepng.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/lodepng.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/stb.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/stb_ds.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/stb_truetype.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/utf8proc/utf8proc.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/utf8proc/utf8proc.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/utf8proc/utf8proc_data.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/adler32.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/compress.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/crc32.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/crc32.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/deflate.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/deflate.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/gzclose.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/gzguts.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/gzlib.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/gzread.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/gzwrite.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/infback.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/inffast.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/inffast.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/inffixed.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/inflate.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/inflate.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/inftrees.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/inftrees.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/trees.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/trees.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/uncompr.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/zconf.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/zlib.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/zutil.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcod/src/vendor/zlib/zutil.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/libtcodpy.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/pyproject.toml +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/requirements.txt +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/setup.cfg +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/setup.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/__init__.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/__pyinstaller/__init__.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/__pyinstaller/hook-tcod.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/_internal.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/_libtcod.pyi +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/bsp.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/cdef.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/cffi.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/cffi.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/color.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/console.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/constants.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/event_constants.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/image.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/libtcodpy.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/los.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/map.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/noise.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/noise.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/noise.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/path.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/path.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/path.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/py.typed +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/random.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/random.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/render.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/sdl/__init__.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/sdl/_internal.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/sdl/audio.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/sdl/constants.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/sdl/joystick.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/sdl/mouse.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/sdl/render.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/sdl/sys.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/sdl/video.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/tcod.c +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/tcod.h +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/tcod.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod/tileset.py +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod.egg-info/SOURCES.txt +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod.egg-info/dependency_links.txt +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod.egg-info/entry_points.txt +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod.egg-info/requires.txt +0 -0
- {tcod-21.0.0 → tcod-21.1.0}/tcod.egg-info/top_level.txt +0 -0
- {tcod-21.0.0 → tcod-21.1.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.1.0] - 2026-04-04
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `MouseButtonEvent.integer_position` property.
|
|
14
|
+
|
|
15
|
+
## Fixed
|
|
16
|
+
|
|
17
|
+
- `integer_position` was missing from mouse button events.
|
|
18
|
+
|
|
9
19
|
## [21.0.0] - 2026-03-13
|
|
10
20
|
|
|
11
21
|
### Added
|
|
@@ -255,8 +255,8 @@ 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, (tcod.event.MouseState, tcod.event.MouseMotion)):
|
|
259
|
-
assert isinstance(event_copy, (tcod.event.MouseState, tcod.event.MouseMotion))
|
|
258
|
+
if isinstance(event, (tcod.event.MouseState, tcod.event.MouseMotion, tcod.event.MouseButtonEvent)):
|
|
259
|
+
assert isinstance(event_copy, (tcod.event.MouseState, tcod.event.MouseMotion, tcod.event.MouseButtonEvent))
|
|
260
260
|
event_copy.position = tcod.event.Point(*self.pixel_to_tile(event.position[0], event.position[1]))
|
|
261
261
|
event._tile = tcod.event.Point(floor(event_copy.position[0]), floor(event_copy.position[1]))
|
|
262
262
|
if isinstance(event, tcod.event.MouseMotion):
|
|
@@ -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
|
"""
|
|
@@ -652,6 +652,15 @@ class MouseButtonEvent(Event):
|
|
|
652
652
|
.. versionadded:: 21.0
|
|
653
653
|
"""
|
|
654
654
|
|
|
655
|
+
@property
|
|
656
|
+
def integer_position(self) -> Point[int]:
|
|
657
|
+
"""Integer coordinates of this event.
|
|
658
|
+
|
|
659
|
+
.. versionadded:: 21.1
|
|
660
|
+
"""
|
|
661
|
+
x, y = self.position
|
|
662
|
+
return Point(floor(x), floor(y))
|
|
663
|
+
|
|
655
664
|
@classmethod
|
|
656
665
|
def _from_sdl_event(cls, sdl_event: _C_SDL_Event) -> Self:
|
|
657
666
|
button = sdl_event.button
|
|
@@ -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.1.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (21, 1, 0)
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g34e7c3a1f'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|