comparison pytouhou/ui/gamerunner.py @ 304:f3099ebf4f61

Update attribute names to reflect the actual interface.
author Thibaut Girka <thib@sitedethib.com>
date Tue, 13 Mar 2012 18:38:14 +0100
parents da53bc29b94a
children 61adb5453e46
comparison
equal deleted inserted replaced
303:647bde10353d 304:f3099ebf4f61
166 glMatrixMode(GL_MODELVIEW) 166 glMatrixMode(GL_MODELVIEW)
167 glLoadIdentity() 167 glLoadIdentity()
168 gluOrtho2D(0., float(self.width), float(self.height), 0.) 168 gluOrtho2D(0., float(self.width), float(self.height), 0.)
169 glViewport(0, 0, self.width, self.height) 169 glViewport(0, 0, self.width, self.height)
170 170
171 items = [item for item in interface.items if item._anmrunner and item._anmrunner._running] 171 items = [item for item in interface.items if item.anmrunner and item.anmrunner.running]
172 labels = interface.labels 172 labels = interface.labels
173 if items: 173 if items:
174 # Force rendering of labels 174 # Force rendering of labels
175 self.render_elements(items) 175 self.render_elements(items)
176 self.render_elements(chain(*(label.objects() 176 self.render_elements(chain(*(label.objects()
177 for label in labels.itervalues()))) 177 for label in labels.itervalues())))
178 else: 178 else:
179 self.render_elements(chain(*(label.objects() 179 self.render_elements(chain(*(label.objects()
180 for label in labels.itervalues() 180 for label in labels.itervalues()
181 if label._changed))) 181 if label.changed)))
182 for label in interface.labels.itervalues(): 182 for label in interface.labels.itervalues():
183 label._changed = False 183 label.changed = False
184 184