本文整理汇总了Python中Main.terminate方法的典型用法代码示例。如果您正苦于以下问题:Python Main.terminate方法的具体用法?Python Main.terminate怎么用?Python Main.terminate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Main
的用法示例。
在下文中一共展示了Main.terminate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: GetInterfaceActions
# 需要导入模块: import Main [as 别名]
# 或者: from Main import terminate [as 别名]
def GetInterfaceActions(mousePastLoc):
a = []
for event in pygame.event.get():
if event.type == QUIT:
Main.terminate()
elif event.type == KEYDOWN:
if event.key == K_ESCAPE:
a.append(('a',chr(27)))
elif event.key == K_0:
a.append(('k','0'))
elif event.key == K_1:
a.append(('k','1'))
elif event.key == K_2:
a.append(('k','2'))
elif event.key == K_3:
a.append(('k','3'))
elif event.key == K_4:
a.append(('k','4'))
elif event.key == K_5:
a.append(('k','5'))
elif event.key == K_6:
a.append(('k','6'))
elif event.key == K_7:
a.append(('k','7'))
elif event.key == K_8:
a.append(('k','8'))
elif event.key == K_9:
a.append(('k','9'))
elif event.key == K_a:
a.append(('k','a'))
elif event.key == K_b:
a.append(('k','b'))
elif event.key == K_c:
a.append(('k','c'))
elif event.key == K_d:
a.append(('k','d'))
elif event.key == K_e:
a.append(('k','e'))
elif event.key == K_f:
a.append(('k','f'))
elif event.key == K_g:
a.append(('k','g'))
elif event.key == K_h:
a.append(('k','h'))
elif event.key == K_i:
a.append(('k','i'))
elif event.key == K_j:
a.append(('k','j'))
elif event.key == K_k:
a.append(('k','k'))
elif event.key == K_l:
a.append(('k','l'))
elif event.key == K_m:
a.append(('k','m'))
elif event.key == K_n:
a.append(('k','n'))
elif event.key == K_o:
a.append(('k','o'))
elif event.key == K_p:
a.append(('k','p'))
elif event.key == K_q:
a.append(('k','q'))
elif event.key == K_r:
a.append(('k','r'))
elif event.key == K_s:
a.append(('k','s'))
elif event.key == K_t:
a.append(('k','t'))
elif event.key == K_u:
a.append(('k','u'))
elif event.key == K_v:
a.append(('k','v'))
elif event.key == K_w:
a.append(('k','w'))
elif event.key == K_x:
a.append(('k','x'))
elif event.key == K_y:
a.append(('k','y'))
elif event.key == K_z:
a.append(('k','z'))
elif event.key == K_KP0:
a.append(('k','0'))
elif event.key == K_KP1:
a.append(('k','1'))
elif event.key == K_KP2:
a.append(('k','2'))
elif event.key == K_KP3:
a.append(('k','3'))
elif event.key == K_KP4:
a.append(('k','4'))
elif event.key == K_KP5:
a.append(('k','5'))
elif event.key == K_KP6:
a.append(('k','6'))
elif event.key == K_KP7:
a.append(('k','7'))
elif event.key == K_KP8:
a.append(('k','8'))
elif event.key == K_KP9:
a.append(('k','9'))
#.........这里部分代码省略.........