Mercurial > boomslang
comparison gamelib/scenes/game_widgets.py @ 681:497b6d7c55e7 pyntnclick
Reimplement JIM-style in gamelib
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sun, 12 Feb 2012 23:57:14 +0200 |
parents | c77d6aa29bee |
children | d6ded808cc33 |
comparison
equal
deleted
inserted
replaced
680:c9562e24bfed | 681:497b6d7c55e7 |
---|---|
1 """Generic, game specific widgets""" | 1 """Generic, game specific widgets""" |
2 | 2 |
3 | 3 |
4 from pyntnclick.state import Thing, Result | 4 from pyntnclick.state import Thing, Result |
5 | |
6 from gamelib.custom_widgets import JimLabel | |
5 | 7 |
6 | 8 |
7 class Door(Thing): | 9 class Door(Thing): |
8 """A door somewhere""" | 10 """A door somewhere""" |
9 | 11 |
29 | 31 |
30 | 32 |
31 def make_jim_dialog(mesg, game): | 33 def make_jim_dialog(mesg, game): |
32 "Utility helper function" | 34 "Utility helper function" |
33 if game.data.get_jim_state() == 'online': | 35 if game.data.get_jim_state() == 'online': |
34 return Result(mesg, style='JIM') | 36 return Result(widget=JimLabel(game.gd, mesg)) |
35 else: | 37 else: |
36 return None | 38 return None |
37 | 39 |
38 | 40 |
39 class BaseCamera(Thing): | 41 class BaseCamera(Thing): |