Mercurial > rinkhals
comparison gamelib/gameboard.py @ 37:497b53b69280
Always update the vidwidget.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Mon, 31 Aug 2009 13:27:27 +0000 |
parents | 5569430fd82e |
children | ec79aabe2bf1 |
comparison
equal
deleted
inserted
replaced
36:5569430fd82e | 37:497b53b69280 |
---|---|
71 def create_disp(self): | 71 def create_disp(self): |
72 width, height = pygame.display.get_surface().get_size() | 72 width, height = pygame.display.get_surface().get_size() |
73 tbl = gui.Table() | 73 tbl = gui.Table() |
74 tbl.tr() | 74 tbl.tr() |
75 tbl.td(ToolBar(self), width=self.TOOLBAR_WIDTH) | 75 tbl.td(ToolBar(self), width=self.TOOLBAR_WIDTH) |
76 tbl.td(VidWidget(self, self.tv, width=width-self.TOOLBAR_WIDTH, height=height)) | 76 self.tvw = VidWidget(self, self.tv, width=width-self.TOOLBAR_WIDTH, height=height) |
77 tbl.td(self.tvw) | |
77 self.disp = gui.App() | 78 self.disp = gui.App() |
78 self.disp.init(tbl) | 79 self.disp.init(tbl) |
79 | 80 |
80 def paint(self, screen): | 81 def paint(self, screen): |
81 self.disp.paint(screen) | 82 self.disp.paint(screen) |
82 | 83 |
83 def update(self, screen): | 84 def update(self, screen): |
85 self.tvw.reupdate() | |
84 return self.disp.update(screen) | 86 return self.disp.update(screen) |
85 | 87 |
86 def loop(self): | 88 def loop(self): |
87 self.tv.loop() | 89 self.tv.loop() |
88 | 90 |