Exemplo n.º 1
0
 def __init__(self):
     # Create carousel - doesn't work so well in .kv
     Carousel.__init__(self,direction='right',loop='true',scroll_distance=80,scroll_timeout=100)
     self.overview = Overview()
     self.add_widget(self.overview)
     self.add_widget(Label(text='Hello World2'))
     self.game = PongGame()
     self.game.serve_ball()
     self.add_widget(self.game)
Exemplo n.º 2
0
 def __init__(self, **kwargs):
     # Create carousel - doesn't work so well in .kv
     Carousel.__init__(self,direction='right',loop='true',scroll_distance=80,scroll_timeout=100,**kwargs)
     self.config = MyConfig()
     self.backlight = BacklightFactory.Make(self.config)
     self.overview = Overview()
     self.add_widget(self.overview)
     self.add_widget(Label(text='Hello World2'))
     self.game = PongGame()
     self.game.serve_ball()
     self.add_widget(self.game)
     self.idle_clock = Clock.schedule_once(self.on_idle, float(self.config.switch_off_time))
     Window.bind(on_motion=self.on_motion)
Exemplo n.º 3
0
 def __init__(self):
     # Create carousel - doesn't work so well in .kv
     Carousel.__init__(self,
                       direction='right',
                       loop='true',
                       scroll_distance=80,
                       scroll_timeout=100)
     self.overview = Overview()
     self.add_widget(self.overview)
     self.add_widget(Label(text='Hello World2'))
     self.game = PongGame()
     self.game.serve_ball()
     self.add_widget(self.game)
Exemplo n.º 4
0
 def __init__(self, **kwargs):
     # Create carousel - doesn't work so well in .kv
     Carousel.__init__(self,
                       direction='right',
                       loop='true',
                       scroll_distance=80,
                       scroll_timeout=100,
                       **kwargs)
     self.config = MyConfig()
     self.backlight = BacklightFactory.Make(self.config)
     self.overview = Overview()
     self.add_widget(self.overview)
     self.add_widget(Label(text='Hello World2'))
     self.game = PongGame()
     self.game.serve_ball()
     self.add_widget(self.game)
     self.idle_clock = Clock.schedule_once(
         self.on_idle, float(self.config.switch_off_time))
     Window.bind(on_motion=self.on_motion)