Skip to main content

A small package that helps handling events in pygame-ce.

Project description

Pygame Event Handler

A simple python package that helps with handling events in pygame-ce.

Features

  • Provides easy-to-use interface for checking if a key is pressed,held, or released (keyboard and mouse buttons)
  • Provides easy-to-use interface to find the location of the mouse cursor
  • Calculates delta time and real time FPS
  • Checks window and mouse focus

Usage

import pygame as pg
from pygame_event_handler.event_handler import EventHandler

pg.init()
screen = pg.display.set_mode([800,600])

event_handler = EventHandler()

while not event_handler.should_quit:
    event_handler.get_events()

Example

In this Video, you can see the features in action, especially window and mouse focus, and held keys.

https://github.com/user-attachments/assets/b8e183ae-26c6-4057-a869-ecc986e25688

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygame_event_handler-0.0.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygame_event_handler-0.0.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file pygame_event_handler-0.0.2.tar.gz.

File metadata

  • Download URL: pygame_event_handler-0.0.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pygame_event_handler-0.0.2.tar.gz
Algorithm Hash digest
SHA256 cc48d4ebcb4a54c30cac51977a795f77235093a027538d3f55f73dc4f07c6067
MD5 785f231e97bfb132a00a3003718d7af6
BLAKE2b-256 4e38b576bf1207755a56fc53671afb04545a0655295c1baf6055a31e13ceb381

See more details on using hashes here.

File details

Details for the file pygame_event_handler-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pygame_event_handler-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f740c788b8581d96cad82256e9b038bfca28e0c064b12d74ae3dcb71750ed101
MD5 69d7cc1135404153aa43f75a62df54c6
BLAKE2b-256 63bef81ffb0ad906cb7e00ae45bee3ae45263bbe245ad8560f0b850aec1cbb9c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page