def on_push_state(self, state): batch.set_batch(self.name) return pyglet.event.EVENT_HANDLED
def on_pop_state(self, state): batch.clear(self.name) batch.set_batch('default') self.window.pop_handlers() return pyglet.event.EVENT_HANDLED
def on_regain_focus(self): batch.set_batch(self.name) return pyglet.event.EVENT_HANDLED