本文整理汇总了Python中Console.shutdown方法的典型用法代码示例。如果您正苦于以下问题:Python Console.shutdown方法的具体用法?Python Console.shutdown怎么用?Python Console.shutdown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Console
的用法示例。
在下文中一共展示了Console.shutdown方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: UI
# 需要导入模块: import Console [as 别名]
# 或者: from Console import shutdown [as 别名]
#.........这里部分代码省略.........
return
for graphic in self._2Dlist:
self.surface.rem2D(graphic)
for text in self._textlist:
self.surface.remtext(text)
self._frozen = True
self.loaded_UI = False
def load_2DUI(self,x):
if self._frozen == False:
self.surface.add2D(x)
self._2Dlist.append(x)
def unload_2DUI(self,x):
if self._frozen == False:
self.surface.rem2D(x)
self._2Dlist.remove(x)
def load_2Dtext(self,x):
if self._frozen == False:
self.surface.addtext(x)
self._textlist.append(x)
def unload_2Dtext(self,x):
if self._frozen == False:
self.surface.remtext(x)
self._textlist.remove(x)
def start(self,kernel):
pass
def stop(self,kernel):
self.console.shutdown()
pass
def pause(self,kernel):
pass
def resume(self,kernel):
pass
def run(self,kernel):
check_keyboard(self.keyboard)
self.refresh_fps()
self.console.input_clock()
pass
def name(self):
return "UI Process"
def switch_focus(self,target=""):
self.unload_2Dtext(self.current_text)
if target=="Engine":
self.input_handler = "Engine"
elif target=="Game":
self.input_handler = "Game"
elif target=="Console":
self.input_handler = "Console"
elif target!="":
pass
kernel.log.error("Unknown focus switch parameter: " + \
target)
elif self.input_handler == "Console":
self.input_handler = "Engine"
elif self.input_handler == "Engine":