Changeset 19:113f31bd9d49


Ignore:
Timestamp:
Sep 1, 2013, 12:50:12 PM (7 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Message:

Clean-up imports.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/screens/menu.py

    r18 r19  
    11"""Display a menu screen."""
    22
    3 from pygame.rect import Rect
    4 from pygame.color import Color
    5 import pygame.locals as pyl
     3import pygame
    64
    75from nagslang.screens.base import Screen
     
    1210
    1311    def handle_event(self, ev):
    14         if ev.type == pyl.KEYDOWN and ev.key == pyl.K_ESCAPE:
     12        if (ev.type == pygame.locals.KEYDOWN
     13                and ev.key == pygame.locals.K_ESCAPE):
    1514            QuitEvent.post()
    1615
    1716    def render(self, surface):
    18         color = Color(255, 0, 0)
    19         rect = Rect(10, 10, 200, 200)
     17        color = pygame.color.Color(255, 0, 0)
     18        rect = pygame.rect.Rect(10, 10, 200, 200)
    2019        surface.fill(color, rect)
Note: See TracChangeset for help on using the changeset viewer.