Example #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)
Example #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)
Example #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)
Example #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)