Mercurial > libervia-web
comparison browser_side/panels.py @ 37:b306aa090438
Tarot game: game launching (first hand showed), and contract selection
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 18 May 2011 01:45:28 +0200 |
parents | 1d406077b49b |
children | 7bea2ae0c4fb |
comparison
equal
deleted
inserted
replaced
36:1d406077b49b | 37:b306aa090438 |
---|---|
22 import pyjd # this is dummy in pyjs | 22 import pyjd # this is dummy in pyjs |
23 from pyjamas.ui.SimplePanel import SimplePanel | 23 from pyjamas.ui.SimplePanel import SimplePanel |
24 from pyjamas.ui.FlowPanel import FlowPanel | 24 from pyjamas.ui.FlowPanel import FlowPanel |
25 from pyjamas.ui.AbsolutePanel import AbsolutePanel | 25 from pyjamas.ui.AbsolutePanel import AbsolutePanel |
26 from pyjamas.ui.VerticalPanel import VerticalPanel | 26 from pyjamas.ui.VerticalPanel import VerticalPanel |
27 from pyjamas.ui.DockPanel import DockPanel | |
28 from pyjamas.ui.HorizontalPanel import HorizontalPanel | 27 from pyjamas.ui.HorizontalPanel import HorizontalPanel |
29 from pyjamas.ui.ScrollPanel import ScrollPanel | 28 from pyjamas.ui.ScrollPanel import ScrollPanel |
30 from pyjamas.ui.TabPanel import TabPanel | 29 from pyjamas.ui.TabPanel import TabPanel |
31 from pyjamas.ui.HTMLPanel import HTMLPanel | 30 from pyjamas.ui.HTMLPanel import HTMLPanel |
32 from pyjamas.ui.PopupPanel import PopupPanel | 31 from pyjamas.ui.PopupPanel import PopupPanel |
561 """Configure the chat window to start a game""" | 560 """Configure the chat window to start a game""" |
562 if game_type=="Tarot": | 561 if game_type=="Tarot": |
563 self.tarot_panel = CardPanel(self, referee, players, self.nick) | 562 self.tarot_panel = CardPanel(self, referee, players, self.nick) |
564 self.vpanel.insert(self.tarot_panel, 1) | 563 self.vpanel.insert(self.tarot_panel, 1) |
565 self.vpanel.setCellHeight(self.tarot_panel, self.tarot_panel.getHeight()) | 564 self.vpanel.setCellHeight(self.tarot_panel, self.tarot_panel.getHeight()) |
565 | |
566 def getGame(self, game_type): | |
567 """Return class managing the game type""" | |
568 #TODO: check that the game is launched, and manage errors | |
569 if game_type=="Tarot": | |
570 return self.tarot_panel | |
566 | 571 |
567 class MainDiscussionPanel(HorizontalPanel): | 572 class MainDiscussionPanel(HorizontalPanel): |
568 | 573 |
569 def __init__(self, host): | 574 def __init__(self, host): |
570 self.host=host | 575 self.host=host |