Depends on your game structure, but if you're using pygame it'd be easiest to just go
import pygame
from pygame.locals import *paused = False
game_is_running = True
while game_is_running: #Set pause varaiable to True if the P key is pressed
for e in pygame.event.get(): if e.type == KEYDOWN and e.key == K_p:
paused = True #Wait until the pause key is pressed again
while paused:
for e in pygame.event.get():
if e.type == KEYDOWN and e.key == K_p:
paused = FalseHTH--
- pymike (
http://pymike.4rensics.org/)