Mercurial > fife-parpg
diff demos/shooter/scripts/gui/guis.py @ 471:7a79dc2a0592
Adding the credits window (still needs to be written)
Hopefully fixed some memory leaks.
Moved the flashing code to the appropriate spot (in ShipBase).
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Thu, 15 Apr 2010 15:53:06 +0000 |
parents | 5994e61cdebd |
children | ab28994820dd |
line wrap: on
line diff
--- a/demos/shooter/scripts/gui/guis.py Wed Apr 14 19:15:27 2010 +0000 +++ b/demos/shooter/scripts/gui/guis.py Thu Apr 15 15:53:06 2010 +0000 @@ -359,4 +359,21 @@ self._widget.hide() def isVisible(self): - return self._widget.isVisible() \ No newline at end of file + return self._widget.isVisible() + +class CreditsDisplay(object): + def __init__(self, world): + self._world = world + self._widget = pychan.loadXML('gui/credits.xml') + + eventMap = { + 'close': self.hide, + } + + self._widget.mapEvents(eventMap) + + def show(self): + self._widget.show() + + def hide(self): + self._widget.hide() \ No newline at end of file