Mercurial > mamba
diff mamba/engine.py @ 24:30d4f3e62bcf
Refactor widgets *again*, add container to Habitat
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Sun, 11 Sep 2011 14:21:50 +0200 |
parents | 6d195a3a4557 |
children | b38411d253e3 |
line wrap: on
line diff
--- a/mamba/engine.py Sun Sep 11 14:06:58 2011 +0200 +++ b/mamba/engine.py Sun Sep 11 14:21:50 2011 +0200 @@ -1,5 +1,6 @@ """Game engine and top-level game loop.""" +from mamba.widgets.base import Container import pygame.event import pygame.display from pygame.locals import QUIT, USEREVENT @@ -28,11 +29,15 @@ class Habitat(object): + + def __init__(self): + self.container = Container() + def dispatch(self, ev): - pass + self.container.event(ev) def draw(self, surface): - pass + self.container.draw(ev) class UserEvent(object):