Esempio n. 1
0
class CountiesApp(App):
    def build(self):
        self.root = Viewport(size=(1920,2160))
        self.bottom_display = BottomDisplay()
        self.top_display = TopDisplay()
        self.root.add_widget(self.bottom_display)
        self.root.add_widget(self.top_display)
        return self.root
Esempio n. 2
0
 def _launch_game_round(dt=None):
     width = BLOCK_SIZE[0] * GAME_AREA_SIZE[0]
     height = BLOCK_SIZE[1] * GAME_AREA_SIZE[1]
     game_scene = Viewport(width=width, height=height)
     game = MoonRabbitGame()
     game_scene.add_widget(game)
     self.context.scene = game_scene
     Clock.schedule_once(game_scene.fit_to_window, -1)
Esempio n. 3
0
 def _launch_game_round(dt=None):
     width = BLOCK_SIZE[0]*GAME_AREA_SIZE[0]
     height = BLOCK_SIZE[1]*GAME_AREA_SIZE[1]
     game_scene = Viewport(width=width, height=height)
     game = MoonRabbitGame()
     game_scene.add_widget(game)
     self.context.scene = game_scene
     Clock.schedule_once(game_scene.fit_to_window, -1)
Esempio n. 4
0
 def build(self):
     vp = Viewport(size=(par_width, par_height))
     mw = MainWidget()
     vp.add_widget(mw)
     mw.initial_load()
     return vp
Esempio n. 5
0
class GameApp(App):
    def build(self):
        self.root = Viewport(size=Window.size)
        self.root.add_widget(Menu())
        return self.root
Esempio n. 6
0
class ViewportApp(App):
    def build(self):
        self.root = Viewport(size=(1080, 1920))
        self.root.add_widget(Factory.Button(text="ViewportApp"))
        return self.root