# HG changeset patch # User Simon Cross # Date 1302216213 -7200 # Node ID ecd26fafbe702a7a88d8e1209f221ecc8b474d43 # Parent 432f6997d3062d01e60ab2f8ffc75eec41b590c6 Add missing file from previous commit. diff -r 432f6997d306 -r ecd26fafbe70 skaapsteker/widgets/bubble.py --- /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)