diff frontends/primitivus/card_game.py @ 162:ae50b53ff868

misc Tarot fixes - wix, primitivus, quick_frontend: autoplay fonction is activated by changing self._autoplay from None to 0 in quick card game - primitivus: added forgotten import of log methods - primitivus: fix bad selected color for notification messages - primitivus: score are now shown
author Goffi <goffi@goffi.org>
date Fri, 06 Aug 2010 12:18:50 +0800
parents 2fa58703f1b7
children 3198bfd66daa
line wrap: on
line diff
--- a/frontends/primitivus/card_game.py	Fri Aug 06 12:11:18 2010 +0800
+++ b/frontends/primitivus/card_game.py	Fri Aug 06 12:18:50 2010 +0800
@@ -275,6 +275,7 @@
         """Called when the player as to select hist contrat
         @param xml_data: SàT xml representation of the form"""
         form = XMLUI(self.parent.host, xml_data, title = _('You win \o/') if self.player_nick in winners else _('You loose :('), options = ['NO_CANCEL'])
+        form.show()
 
     def invalidCards(self, phase, played_cards, invalid_cards):
         """Invalid cards have been played
@@ -283,7 +284,8 @@
         @param invalid_cards: cards which are invalid"""
         QuickCardGame.invalidCards(self, phase, played_cards, invalid_cards)
         self.hand_wid.update(self.hand)
-        self.parent.host.notify(_('Cards played are invalid !'))
+        if self._autoplay==None: #No dialog if there is autoplay
+            self.parent.host.notify(_('Cards played are invalid !'))
         self.parent.host.redraw()
     
     def cardsPlayed(self, player, cards):