本文整理汇总了Python中CvScreensInterface.reinitMainInterface方法的典型用法代码示例。如果您正苦于以下问题:Python CvScreensInterface.reinitMainInterface方法的具体用法?Python CvScreensInterface.reinitMainInterface怎么用?Python CvScreensInterface.reinitMainInterface使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CvScreensInterface
的用法示例。
在下文中一共展示了CvScreensInterface.reinitMainInterface方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: initAfterReload
# 需要导入模块: import CvScreensInterface [as 别名]
# 或者: from CvScreensInterface import reinitMainInterface [as 别名]
def initAfterReload():
"""
Initialize BUG and fires PythonReloaded event after reloading Python modules while game is still running.
The first time this module is loaded after the game launches, the global context is not yet ready,
and thus BUG cannot be initialized. When the Python modules are reloaded after being changed, however,
this will reinitialize BUG and the main interface.
"""
import BugInit
if BugInit.init():
try:
import CvScreensInterface
CvScreensInterface.reinitMainInterface()
except:
import BugUtil
BugUtil.error("BugInit - failure rebuilding main interface after reloading Python modules")
getEventManager().fireEvent("PythonReloaded")
import CvMainInterface #added Sephi
mainInterface = CvMainInterface.CvMainInterface()
mainInterface.initState()
# initialize BUG after Python modules have been reloaded
initAfterReload()