class MyApp(App): def build(self): # Create the screen manager self.sm = ScreenManager() self.client = Client() # client for gui self.main_scr = MainScreen(self.sm, self.client, name='main') self.init_scr = InitialScreen(self.sm, self.client, name='initial') self.sm.add_widget(self.init_scr) self.sm.add_widget(self.main_scr) return self.sm def on_stop(self): self.client.stop_updating_servers() self.main_scr.disconnect()
def build(self): # Create the screen manager self.sm = ScreenManager() self.client = Client() # client for gui self.main_scr = MainScreen(self.sm, self.client, name='main') self.init_scr = InitialScreen(self.sm, self.client, name='initial') self.sm.add_widget(self.init_scr) self.sm.add_widget(self.main_scr) return self.sm