source: nagslang/screens/menu.py@ 18:9ecb1d222ee0

Last change on this file since 18:9ecb1d222ee0 was 18:9ecb1d222ee0, checked in by Simon Cross <hodgestar@…>, 8 years ago

Screens.

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