Ignore:
Timestamp:
09/01/13 20:57:03 (8 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Phase:
public
Rebase:
37323834343836616635633436343639366630393239346361663738306232393830303633333233
Message:

Make the window resizable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/engine.py

    r41 r85  
    22
    33import pygame
     4import pygame.locals as pgl
    45
    56from nagslang import constants
     
    3435        while running:
    3536            for ev in pygame.event.get():
    36                 if ev.type == pygame.locals.QUIT:
     37                if ev.type == pgl.QUIT:
    3738                    running = False
     39                elif ev.type == pgl.VIDEORESIZE:
     40                    pygame.display.set_mode(ev.size,
     41                            pgl.SWSURFACE | pgl.RESIZABLE)
     42                    self._surface = pygame.display.get_surface()
    3843                elif ScreenChange.matches(ev):
    3944                    self.change_screen(ev.screen)
Note: See TracChangeset for help on using the changeset viewer.