comparison frontends/src/primitivus/game_tarot.py @ 1972:02d21a589be2

quick_frontend, primitivus: notifications refactoring replaced old "alerts" system by a more generic one which use listeners and can activate callbacks on notification click.
author Goffi <goffi@goffi.org>
date Mon, 27 Jun 2016 22:36:22 +0200
parents 2daf7b4c6756
children 8b37a62336c3
comparison
equal deleted inserted replaced
1971:9421e721d5e2 1972:02d21a589be2
292 @param played_cards: all the cards played 292 @param played_cards: all the cards played
293 @param invalid_cards: cards which are invalid""" 293 @param invalid_cards: cards which are invalid"""
294 QuickTarotGame.tarotGameInvalidCardsHandler(self, phase, played_cards, invalid_cards) 294 QuickTarotGame.tarotGameInvalidCardsHandler(self, phase, played_cards, invalid_cards)
295 self.hand_wid.update(self.hand) 295 self.hand_wid.update(self.hand)
296 if self._autoplay == None: # No dialog if there is autoplay 296 if self._autoplay == None: # No dialog if there is autoplay
297 self.parent.host.notify(_('Cards played are invalid !')) 297 self.parent.host.barNotify(_('Cards played are invalid !'))
298 self.parent.host.redraw() 298 self.parent.host.redraw()
299 299
300 def tarotGameCardsPlayedHandler(self, player, cards): 300 def tarotGameCardsPlayedHandler(self, player, cards):
301 """A card has been played by player""" 301 """A card has been played by player"""
302 QuickTarotGame.tarotGameCardsPlayedHandler(self, player, cards) 302 QuickTarotGame.tarotGameCardsPlayedHandler(self, player, cards)