(self, msg)
| 662 | messagequeue = [] # add messages generated during loading here |
| 663 | class Message: |
| 664 | def __init__(self, msg): |
| 665 | if not 'window' in globals(): |
| 666 | print(msg) # dump it to console just in case |
| 667 | messagequeue.append(msg) # but we'll display this later |
| 668 | return |
| 669 | self.batch = pyglet.graphics.Batch() |
| 670 | self.label = pyglet.text.Label(msg, |
| 671 | font_name=self.fontlist_serif, |
| 672 | color=cfg.COLOR_TEXT, |
| 673 | batch=self.batch, |
| 674 | multiline=True, |
| 675 | width=(4*window.width)/5, |
| 676 | font_size=calc_fontsize(14), |
| 677 | x=width_center(), y=height_center(), |
| 678 | anchor_x='center', anchor_y='center') |
| 679 | window.push_handlers(self.on_key_press, self.on_draw) |
| 680 | self.on_draw() |
| 681 | |
| 682 | def on_key_press(self, sym, mod): |
| 683 | if sym: |
nothing calls this directly
no test coverage detected