diff frontends/src/wix/chat.py @ 361:141eeb7cd9e6

Quizz game: first draft
author Goffi <goffi@goffi.org>
date Sun, 12 Jun 2011 16:28:33 +0200
parents 1a990a88bff2
children e66d300c5d42
line wrap: on
line diff
--- a/frontends/src/wix/chat.py	Mon Jun 06 21:55:59 2011 +0200
+++ b/frontends/src/wix/chat.py	Sun Jun 12 16:28:33 2011 +0200
@@ -30,6 +30,7 @@
 from sat_frontends.quick_frontend.quick_chat import QuickChat
 from sat_frontends.wix.contact_list import ContactList
 from sat_frontends.wix.card_game import CardPanel
+from sat_frontends.wix.quiz_game import QuizPanel
 
 
 idSEND           = 1
@@ -118,13 +119,21 @@
             self.sizer.Layout()
             self.Fit()
             self.splitter.UpdateSize()
+        elif game_type=="Quiz":
+            debug (_("configure chat window for Quiz game"))
+            self.quiz_panel = QuizPanel(self, referee, players, self.nick)
+            self.sizer.Prepend(self.quiz_panel, 0, flag=wx.EXPAND)
+            self.sizer.Layout()
+            self.Fit()
+            self.splitter.UpdateSize()
 
     def getGame(self, game_type):
         """Return class managing the game type"""
         #TODO: check that the game is launched, and manage errors
         if game_type=="Tarot":
             return self.tarot_panel 
-
+        elif game_type=="Quiz":
+            return self.quiz_panel 
 
     def setPresents(self, nicks):
         """Set the users presents in the contact list for a group chat