Installation
pip install pygame_pause
How to use it?
import pygame import sys import os """first just import the module""" from pygame_pause import pause
pygame.init() pygame.mixer.init() pygame.font.init() pygame.display.init() screen=pygame.display.set_mode((1500,800),pygame.RESIZABLE) pygame.display.set_caption('pause module example') clock=pygame.time.Clock() fps=60 def gameloop(): x=100 x_vol=0 y=200 y_vol=0
while True:
mouse=pygame.mouse.get_pos()
for event in pygame.event.get():
if event.type==pygame.QUIT:
pygame.quit()
if event.type==pygame.KEYDOWN:
if event.key==pygame.K_a:
"""second just call the module"""
pause.pause(gameloop)
if event.key==pygame.K_RIGHT:
x_vol=10
if event.key==pygame.K_LEFT:
x_vol=-10
if event.key==pygame.K_UP:
y_vol=-10
if event.key==pygame.K_DOWN:
y_vol=10
elif event.type==pygame.KEYUP:
if event.key==pygame.K_RIGHT:
x_vol=0
if event.key==pygame.K_LEFT:
x_vol=0
if event.key==pygame.K_UP:
y_vol=0
if event.key==pygame.K_DOWN:
y_vol=0
x+=x_vol
y+=y_vol
screen.fill((255,255,255))
mouse_rect=pygame.draw.rect(screen,(0,0,255),(x,y,100,50))
clock.tick(fps)
pygame.display.flip()
gameloop()
License
© 2023 KURBAN HUSSAIN
This repository is licensed under the MIT license. See LICENSE for details.
Metadata
Release files for pygame-pause 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pygame_pause-1.0.0.tar.gz | 3.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pygame_pause-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.2 kB
Release files / pygame_pause-1.0.0.tar.gz
| Download URL | pygame_pause-1.0.0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27e006c7045956de512021bf7713c9005ac4ccf8edf3ad6064ce12974f11f0d5
|
|
BLAKE2b-256 checksum How to use checksums |
51805e2edbfd6155ef81247e08f64c06f5c41071cf38e3f8439bd582e724e175
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / pygame_pause-1.0.0-py3-none-any.whl
| Download URL | pygame_pause-1.0.0-py3-none-any.whl |
|---|---|
| Size | 3.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b84dc5f07ca7486ca81e511bcc8bb9898e8793c92cafc60c57e4e5b093d222ae
|
|
BLAKE2b-256 checksum How to use checksums |
c292b509188156e56c3c7b2b7be252de43b289471fe835d0cf368aa611a140e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Security for pygame-pause 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.