source: nagslang/screens/menu.py@ 19:113f31bd9d49

Last change on this file since 19:113f31bd9d49 was 19:113f31bd9d49, checked in by Simon Cross <hodgestar@…>, 8 years ago

Clean-up imports.

File size: 476 bytes
Line 
1"""Display a menu screen."""
2
3import pygame
4
5from nagslang.screens.base import Screen
6from nagslang.events import QuitEvent
7
8
9class MenuScreen(Screen):
10
11 def handle_event(self, ev):
12 if (ev.type == pygame.locals.KEYDOWN
13 and ev.key == pygame.locals.K_ESCAPE):
14 QuitEvent.post()
15
16 def render(self, surface):
17 color = pygame.color.Color(255, 0, 0)
18 rect = pygame.rect.Rect(10, 10, 200, 200)
19 surface.fill(color, rect)
Note: See TracBrowser for help on using the repository browser.