当前位置: 首页>>代码示例>>Python>>正文


Python CvScreensInterface.showModUpdaterScreen方法代码示例

本文整理汇总了Python中CvScreensInterface.showModUpdaterScreen方法的典型用法代码示例。如果您正苦于以下问题:Python CvScreensInterface.showModUpdaterScreen方法的具体用法?Python CvScreensInterface.showModUpdaterScreen怎么用?Python CvScreensInterface.showModUpdaterScreen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CvScreensInterface的用法示例。


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

示例1: _delayedPythonCallUtil

# 需要导入模块: import CvScreensInterface [as 别名]
# 或者: from CvScreensInterface import showModUpdaterScreen [as 别名]
    def _delayedPythonCallUtil(_self, argsList):
        iArg1, iArg2 = argsList
        #print("delayedPythonCall triggerd with %i %i" % (iArg1, iArg2))

        if iArg1 == 1 and iArg2 == 0:

            # To avoid nested redrawing of two threads (leads to CtD)
            # try to win the battle by periodical requests if getMousePos()
            # returns a valid value.
            #(If yes, drawing will not causes an 'unidentifiable C++ exception'
            # in fullscreen mode.)

            iRepeat = 1000  # Milliseconds till next check
            pt = CyInterface().getMousePos()
            #print("Mouse position (%i, %i)" % (int(pt.x), int(pt.y)))

            if pt.x == 0 and pt.y == 0:
                print("(ModUpdaterScreen) Hey, window not ready for drawing."
                      "Wait %s milliseconds..." % (iRepeat,))
                return iRepeat
            else:
                if not CvScreensInterface.modUpdaterScreen.FIRST_DRAWN:
                    CvScreensInterface.showModUpdaterScreen()

                return 0

        # Unhandled argument combination... Should not be reached.
        return 0
开发者ID:YggdrasiI,项目名称:PBStats,代码行数:30,代码来源:CvModUpdaterScreen.py

示例2: onWindowActivation

# 需要导入模块: import CvScreensInterface [as 别名]
# 或者: from CvScreensInterface import showModUpdaterScreen [as 别名]
	def onWindowActivation(self, argsList):
		'Called when the game window activates or deactivates'
		bActive = argsList[0]

		# Updater Mod
		if not hasattr(CvScreensInterface, "showModUpdaterScreen"):
			CvModUpdaterScreen.integrate()

		# Show ModUpdater screen after Window switch
		if( bActive and
			-1 == CyGame().getActivePlayer() and not CyGame().isPitbossHost()):
			CvScreensInterface.showModUpdaterScreen()
开发者ID:YggdrasiI,项目名称:PBStats,代码行数:14,代码来源:CvEventManager.py


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