comparison browser_side/panels.py @ 127:e19a8de8b3de

radio collective first draft
author Goffi <goffi@goffi.org>
date Sun, 22 Jan 2012 19:38:05 +0100
parents 5cb852d9757e
children 2849ec993d89
comparison
equal deleted inserted replaced
126:adecb2566b53 127:e19a8de8b3de
40 from pyjamas.ui import HasAlignment 40 from pyjamas.ui import HasAlignment
41 from pyjamas.Timer import Timer 41 from pyjamas.Timer import Timer
42 from pyjamas import Window 42 from pyjamas import Window
43 from pyjamas import DOM 43 from pyjamas import DOM
44 from card_game import CardPanel 44 from card_game import CardPanel
45 from radiocol import RadioColPanel
45 from menu import Menu 46 from menu import Menu
46 from jid import JID 47 from jid import JID
47 from tools import html_sanitize 48 from tools import html_sanitize
48 from datetime import datetime 49 from datetime import datetime
49 from time import time 50 from time import time
730 """Configure the chat window to start a game""" 731 """Configure the chat window to start a game"""
731 if game_type=="Tarot": 732 if game_type=="Tarot":
732 self.tarot_panel = CardPanel(self, referee, players, self.nick) 733 self.tarot_panel = CardPanel(self, referee, players, self.nick)
733 self.vpanel.insert(self.tarot_panel, 0) 734 self.vpanel.insert(self.tarot_panel, 0)
734 self.vpanel.setCellHeight(self.tarot_panel, self.tarot_panel.getHeight()) 735 self.vpanel.setCellHeight(self.tarot_panel, self.tarot_panel.getHeight())
736 elif game_type=="RadioCol":
737 self.radiocol_panel = RadioColPanel(self, referee, self.nick)
738 self.vpanel.insert(self.radiocol_panel, 0)
739 self.vpanel.setCellHeight(self.radiocol_panel, self.radiocol_panel.getHeight())
735 740
736 def getGame(self, game_type): 741 def getGame(self, game_type):
737 """Return class managing the game type""" 742 """Return class managing the game type"""
738 #TODO: check that the game is launched, and manage errors 743 #TODO: check that the game is launched, and manage errors
739 if game_type=="Tarot": 744 if game_type=="Tarot":