summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Gayot <olivier.gayot@sigexec.com>2021-11-15 23:53:54 +0100
committerOlivier Gayot <olivier.gayot@sigexec.com>2021-11-15 23:53:54 +0100
commit61154ffeb9d3f064bad20f744d638ba2f851411c (patch)
treecbf9f597d26a6d09cf75e587def63620da03a126
parenta950cd638a1bec64d17531d4fbf8293bb7610925 (diff)
Document the Pause screen module
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
-rw-r--r--cameltris/screens/pause.py4
1 files changed, 4 insertions, 0 deletions
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]] = {}