Mercurial > skaapsteker
changeset 252:ecd26fafbe70
Add missing file from previous commit.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Fri, 08 Apr 2011 00:43:33 +0200 |
parents | 432f6997d306 |
children | dff6287b55b7 |
files | skaapsteker/widgets/bubble.py |
diffstat | 1 files changed, 25 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/skaapsteker/widgets/bubble.py Fri Apr 08 00:43:33 2011 +0200 @@ -0,0 +1,25 @@ +"""Widget for in-level dialogue / speech bubbles.""" + +from pygame.locals import (KEYDOWN, K_UP, K_p, K_q, K_x, K_z, K_RETURN) + +from ..engine import OpenDialog, CloseDialog + + +class DialogueWidget(object): + + def __init__(self, npc): + self.npc = npc + self.dsm = npc.dsm + print self.dsm.get_state().text + print "Press RETURN to continue.""" + + def draw(self, level_surface): + pass + + def close(self): + pass + + def dispatch(self, ev): + if ev.type is KEYDOWN: + if ev.key is K_RETURN: + CloseDialog.post(self.npc)