• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python ui.back函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中ui.back函数的典型用法代码示例。如果您正苦于以下问题:Python back函数的具体用法?Python back怎么用?Python back使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了back函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: out_callback

 def out_callback(line):
     if 'Established control over the server. You have command access level' in line:
         ui.back(anim=False)
         start_button = ui.Dialog(ui.screen, ui.Button('Touch to start game', callback))
         start_button.back = callback
         ui.set(start_button, anim=False)
         sc_client.out_window_callback = None
开发者ID:gcgrant,项目名称:freeciv-android,代码行数:7,代码来源:save.py


示例2: _finish

 def _finish():
     if text.label:
         graphics.stop_text_input()
         finish(text.label)
         ui.back(allow_override=False)
     else:
         _cancel()
开发者ID:4nakin,项目名称:freeciv-android,代码行数:7,代码来源:uidialog.py


示例3: downloaded

def downloaded(data):
    ui.set_dialog(ui.Label('Loading save...'))
    uncompressed = lzma.decompress(data)
    print 'Uncompressed size', len(uncompressed)
    dl_path = save.get_save_dir() + '/downloaded_save'
    try:
        os.remove(dl_path)
    except OSError:
        print 'not removed...'
    with open(dl_path, 'wb') as f:
        f.write(uncompressed)
    ui.back(anim=False)
    save.load_game(dl_path)
开发者ID:MegaMark16,项目名称:freeciv-android,代码行数:13,代码来源:sync.py


示例4: pause

def pause():
    if client.client:
        print "pause occured"
        print "saving game"
        client.client.chat("/save %s/pause_save.sav.gz" % save.get_save_dir())
        with open(pause_file, "w") as f:
            f.write("version=1\n")
        time.sleep(features.get("app.shutdown"))
        if not osutil.is_paused():
            remove_pause_file()
            return
        print "turning off server"
        client.client.disconnect()
        ui.back(allow_override=False)
        osutil.wait_for_resume()
        resume()
    else:
        osutil.wait_for_resume()
开发者ID:joglomedia,项目名称:freeciv-android,代码行数:18,代码来源:main.py


示例5: comment_upload

def comment_upload(install_time):
    ui.execute_later(lambda: ui.message('Compressing log...'))

    content = lzma.compress(open(save.get_save_dir() + '/more.log').read())

    ui.execute_later(lambda: ui.back())

    request(lambda result: comment_next(install_time), 'upload_log', content, install_time,
            banner="Uploading log (%dkB)" % (len(content)/1024))
开发者ID:bbqchickenrobot,项目名称:freeciv-android,代码行数:9,代码来源:sync.py


示例6: pause

def pause():
    if client.client:
        print 'pause occured'
        print 'saving game'
        client.client.chat('/save %s/pause_save.sav.gz' % save.get_save_dir())
        with open(pause_file, 'w') as f:
            f.write('version=1\n')
        time.sleep(featues.get('app.shutdown'))
        if not osutil.is_paused():
            remove_pause_file()
            return
        print 'turning off server'
        client.client.disconnect()
        ui.back(allow_override=False)
        osutil.wait_for_resume()
        resume()
    else:
        osutil.wait_for_resume()
开发者ID:renatolouro,项目名称:freeciv-android,代码行数:18,代码来源:main.py


示例7: comment_upload

def comment_upload(install_time):
    with ui.execute_later_lock:
        ui.execute_later.append(lambda: ui.message("Compressing log..."))

    content = lzma.compress(open(save.get_save_dir() + "/more.log").read())

    with ui.execute_later_lock:
        ui.execute_later.append(lambda: ui.back())

    request(
        lambda result: comment_next(install_time),
        "upload_log",
        content,
        install_time,
        banner="Uploading log (%dkB)" % (len(content) / 1024),
    )
开发者ID:renatolouro,项目名称:freeciv-android,代码行数:16,代码来源:sync.py


示例8: sync_request

def sync_request(callback, name, args, kwargs):
    func = getattr(client(), name)
    try:
        try:
            result = func(*args, **kwargs)
        except civsync.LoginError as err:
            print 'Login failed:', err
            ui.back(anim=False)
            self = lambda: request(callback, name, *args, **kwargs)
            ui.execute_later(lambda: show_login_form(self, str(err)))
            return
    except Exception as err:
        traceback.print_exc()
        ui.back(anim=False)
        ui.execute_later(lambda: ui.message('Failed to connect to the internet'))
        return
    ui.back(anim=False)
    ui.execute_later(lambda: callback(result))
开发者ID:bbqchickenrobot,项目名称:freeciv-android,代码行数:18,代码来源:sync.py


示例9: save

 def save():
     self.chat('/save')
     ui.back()
开发者ID:turbo-codes,项目名称:freeciv-android,代码行数:3,代码来源:gamescreen.py


示例10: quit

 def quit():
     self.disconnect()
     ui.back(anim=False) # close dialog
     ui.back(allow_override=False) # close game
开发者ID:turbo-codes,项目名称:freeciv-android,代码行数:4,代码来源:gamescreen.py


示例11: focus

 def focus(unit):
     unit.focus()
     ui.back()
开发者ID:turbo-codes,项目名称:freeciv-android,代码行数:3,代码来源:gamescreen.py


示例12: never

 def never():
     features.set_perm('app.marketnotice', False)
     ui.back()
开发者ID:at13,项目名称:freeciv-android,代码行数:3,代码来源:main.py


示例13: fcallback

 def fcallback(action_ident):
     self.client.get_unit_in_focus().perform_activity(action_ident)
     ui.back()
开发者ID:turbo-codes,项目名称:freeciv-android,代码行数:3,代码来源:gamemenu.py


示例14: load_game_now

def load_game_now(port, username):
    client.client.chat('/take "%s"' % username)
    client.client.chat('/%s' % features.get('app.difficulty'))
    client.client.chat('/start')
    client.client.tick()
    ui.back(allow_override=False)
开发者ID:zielmicha,项目名称:freeciv-android,代码行数:6,代码来源:save.py


示例15: set_goal

 def set_goal(tech):
     tech.set_as_goal()
     ui.back()
开发者ID:renatolouro,项目名称:freeciv-android,代码行数:3,代码来源:gamescreen.py


示例16: meet

 def meet(player):
     ui.back()
     ui.back()
     player.meet()
开发者ID:MegaMark16,项目名称:freeciv-android,代码行数:4,代码来源:empiredlg.py


示例17: save_db

 def save_db():
     ui.back()
     self.save_and_get_name(lambda path: dropbox.save(path))
开发者ID:turbo-codes,项目名称:freeciv-android,代码行数:3,代码来源:gamescreen.py


示例18: back

 def back(self):
     ui.back(allow_override=False, anim=False)
开发者ID:4nakin,项目名称:freeciv-android,代码行数:2,代码来源:dialog.py


示例19: clicked

 def clicked(it):
     ui.back(anim=False)
     (callback or default_callback)(it)
开发者ID:4nakin,项目名称:freeciv-android,代码行数:3,代码来源:dialog.py


示例20: call_callback

 def call_callback():
     callback()
     ui.back()
开发者ID:4nakin,项目名称:freeciv-android,代码行数:3,代码来源:dialog.py



注:本文中的ui.back函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python ui.error函数代码示例发布时间:2022-05-27
下一篇:
Python uhd_transmitter.add_options函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap