comparison demos/rpg/scripts/guicontroller.py @ 544:c9bdf145069f

credits screen now comes up properly when you click on the credits button.
author vtchill@33b003aa-7bff-0310-803a-e67f0ece8222
date Thu, 03 Jun 2010 02:36:09 +0000
parents 1afe46247ab1
children 69d50e751c9a
comparison
equal deleted inserted replaced
543:cb7ec12214a9 544:c9bdf145069f
62 } 62 }
63 63
64 self._widget.mapEvents(eventMap) 64 self._widget.mapEvents(eventMap)
65 65
66 class Credits(Window): 66 class Credits(Window):
67 def __init__(self, guicontroller): 67 def __init__(self, gamecontroller):
68 super(Credits, self).__init__(gamecontroller) 68 super(Credits, self).__init__(gamecontroller)
69 self._widget = pychan.loadXML('gui/credits.xml') 69 self._widget = pychan.loadXML('gui/credits.xml')
70 70
71 eventMap = { 71 eventMap = {
72 'close': self._guicontroller.hideCredits, 72 'close': self._guicontroller.hideCredits,
123 123
124 def showCredits(self): 124 def showCredits(self):
125 if self._credits: 125 if self._credits:
126 self._credits.widget.show() 126 self._credits.widget.show()
127 else: 127 else:
128 self._credits = Credits(self) 128 self._credits = Credits(self._gamecontroller)
129 self._credits.widget.show() 129 self._credits.widget.show()
130 130
131 def hideCredits(self): 131 def hideCredits(self):
132 if self._credits: 132 if self._credits:
133 self._credits.widget.hide() 133 self._credits.widget.hide()