From 61154ffeb9d3f064bad20f744d638ba2f851411c Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Mon, 15 Nov 2021 23:53:54 +0100 Subject: Document the Pause screen module Signed-off-by: Olivier Gayot --- cameltris/screens/pause.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cameltris/screens') diff --git a/cameltris/screens/pause.py b/cameltris/screens/pause.py index c8e6c69..0963f45 100644 --- a/cameltris/screens/pause.py +++ b/cameltris/screens/pause.py @@ -1,3 +1,5 @@ +""" Module that defines the pause screen class """ + import contextlib import sys from typing import Callable, NoReturn @@ -10,11 +12,13 @@ from ..misc import UnPause def handle_input_pressed(controller: Controller, event: pygame.event.Event): + """ Function that checks the input pressed and triggers the relevant action """ if controller.get_input_down(event) == Input.PAUSE: raise UnPause() class Pause(Screen): + """ Represents the pause screen """ def __init__(self, screen: pygame.surface.Surface): self.event_handler: dict[int, Callable[[pygame.event.Event], None]] = {} -- cgit v1.2.3