Ejemplo n.º 1
0
            def __init__(self):
                WidgetState.__init__(self)
                Button("Game paused by host.", (None, None), None)
                if game.server:
                    Button(
                        "Continue",
                        (None, common.screen.get_height() / 2 + 50),
                        lambda: game.server_call("unpause"),
                    )
                Button(
                    "Quit",
                    (None, common.screen.get_height() / 2 + 85),
                    lambda: self.leave_game(),
                )

                game.unpause_signal.connect(self.resume)
Ejemplo n.º 2
0
    def __init__(self):
        from widget import Label

        WidgetState.__init__(self)
        Label("Waiting for Players to join", (None, None))
Ejemplo n.º 3
0
 def quit(self):
     WidgetState.quit(self)
     game.unpause_signal.disconnect(self.resume)
Ejemplo n.º 4
0
    def __init__(self):
        from widget import Label

        WidgetState.__init__(self)
        Label("Connecting to server", (None, None))
Ejemplo n.º 5
0
                def quit(self):
                    WidgetState.quit(self)
                    game.game_state.quit()
                    from state import IgnoreEvent

                    raise IgnoreEvent
Ejemplo n.º 6
0
 def __init__(self):
     WidgetState.__init__(self)
     Button(string, (None, None), None)
     Button("OK", (None, common.screen.get_height() / 2 + 50),
            self.quit)
Ejemplo n.º 7
0
 def __init__(self):
     WidgetState.__init__(self)
     Button("Your last castle has fallen!", (None, None), None)
     Button("OK", (None, common.screen.get_height() / 2 + 50),
            self.quit)
Ejemplo n.º 8
0
 def __init__(self):
     WidgetState.__init__(self)
     Button("Castle successfully defended!", (None, None), None)
     Button("OK", (None, common.screen.get_height() / 2 + 50),
            self.quit)