comparison browser_side/panels.py @ 285:4f0c2fea358a

browser_side (plugin radiocol): use the status label to give more information
author souliane <souliane@mailoo.org>
date Tue, 26 Nov 2013 19:51:02 +0100
parents ae3ec654836d
children 20a9aedc60b5
comparison
equal deleted inserted replaced
284:bee4719af9b9 285:4f0c2fea358a
1027 self.printInfo('* %s %s' % (nick, msg[4:]), type='me') 1027 self.printInfo('* %s %s' % (nick, msg[4:]), type='me')
1028 return 1028 return
1029 self.content.add(ChatText(timestamp, nick, mymess, msg, extra.get('xhtml'))) 1029 self.content.add(ChatText(timestamp, nick, mymess, msg, extra.get('xhtml')))
1030 self.content_scroll.scrollToBottom() 1030 self.content_scroll.scrollToBottom()
1031 1031
1032 def startGame(self, game_type, referee, players, waiting=False): 1032 def startGame(self, game_type, waiting, referee, players, *args):
1033 """Configure the chat window to start a game""" 1033 """Configure the chat window to start a game"""
1034 classes = {"Tarot": CardPanel, "RadioCol": RadioColPanel} 1034 classes = {"Tarot": CardPanel, "RadioCol": RadioColPanel}
1035 if game_type not in classes.keys(): 1035 if game_type not in classes.keys():
1036 return # unknown game 1036 return # unknown game
1037 attr = game_type.lower() 1037 attr = game_type.lower()
1040 return # waiting for player or not playing 1040 return # waiting for player or not playing
1041 attr = "%s_panel" % attr 1041 attr = "%s_panel" % attr
1042 if hasattr(self, attr): 1042 if hasattr(self, attr):
1043 return 1043 return
1044 print ("%s Game Started \o/" % game_type) 1044 print ("%s Game Started \o/" % game_type)
1045 panel = classes[game_type](self, referee, self.nick, players) 1045 panel = classes[game_type](self, referee, self.nick, players, *args)
1046 setattr(self, attr, panel) 1046 setattr(self, attr, panel)
1047 self.vpanel.insert(panel, 0) 1047 self.vpanel.insert(panel, 0)
1048 self.vpanel.setCellHeight(panel, panel.getHeight()) 1048 self.vpanel.setCellHeight(panel, panel.getHeight())
1049 1049
1050 def getGame(self, game_type): 1050 def getGame(self, game_type):