main.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:PyWallet 作者: AndreMiras 项目源码 文件源码
def screen_manager_current(self, current, direction=None, history=True):
        screens = {
            'overview': OverviewScreen,
            'switch_account': SwitchAccountScreen,
            'manage_keystores': ManageKeystoreScreen,
            'flashqrcode': FlashQrCodeScreen,
            'about': AboutScreen,
        }
        screen_manager = self.screen_manager
        # creates the Screen object if it doesn't exist
        if not screen_manager.has_screen(current):
            screen = screens[current](name=current)
            screen_manager.add_widget(screen)
        if direction is not None:
            screen_manager.transition.direction = direction
        screen_manager.current = current
        if history:
            # do not update history if it's the same screen because we do not
            # want the go back button to behave like it was doing nothing
            if not self.screen_history or self.screen_history[-1] != current:
                self.screen_history.append(current)
        # in this case let's reset since the overview is the root screen
        # because we never want the back button to bring us from overview
        # to another screen
        if current == 'overview':
            self.screen_history = []
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号