當前位置: 首頁>>代碼示例>>Python>>正文


Python GUI.reSort方法代碼示例

本文整理匯總了Python中GUI.reSort方法的典型用法代碼示例。如果您正苦於以下問題:Python GUI.reSort方法的具體用法?Python GUI.reSort怎麽用?Python GUI.reSort使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在GUI的用法示例。


在下文中一共展示了GUI.reSort方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: handleMouseEnterEvent

# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import reSort [as 別名]
    def handleMouseEnterEvent(self, comp):
        if self.gameStarted:
            t = GUI.Text('YOU LOSE! Time: %.2f sec.' % (BigWorld.time() - self.gameStartTime))
            t.colour = (255, 0, 0, 255)
            t.position.z = 0.5
            GUI.addRoot(t)
            GUI.reSort()
            BigWorld.callback(5, clear)
            for root in GUI.roots():
                if isinstance(root.script, _GameSquare):
                    root.script.gameStarted = False

        return False
開發者ID:webiumsk,項目名稱:WOT-0.9.14-CT,代碼行數:15,代碼來源:guitest.py

示例2: game

# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import reSort [as 別名]
def game():
    """
            Small game where the objective is to not touch the boxes
            with the mouse for as long as possible :). Probably not
            very challenging...
            
            This will test mouse hit testing on moving components while and 
            hit testing while the mouse isn't being moved (i.e. you should be 
            able to lose the game when not moving the mouse).
    """
    clear()
    for i in range(10):
        GUI.addRoot(_GameSquare.create().component)

    t = GUI.Text('Get ready...')
    t.colour = (255, 0, 0, 255)
    t.position.z = 0.5
    GUI.mcursor().clipped = True
    GUI.addRoot(t)
    BigWorld.callback(3, partial(_gameStarted, t))
    GUI.reSort()
開發者ID:webiumsk,項目名稱:WOT-0.9.14-CT,代碼行數:23,代碼來源:guitest.py

示例3: game

# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import reSort [as 別名]
def game():
	"""
		Small game where the objective is to not touch the boxes
		with the mouse for as long as possible :). Probably not
		very challenging...
		
		Note: Since hit testing in the GUI system is only ever done
		when moving the mouse, the hit testing is a little flakey.
	"""
	clear()

	for i in range(10):
		GUI.addRoot( _GameSquare.create().component )
		
	t = GUI.Text("Get ready...")
	t.colour = (255,0,0,255)
	t.position.z = 0.5
	
	GUI.addRoot(t)
	BigWorld.callback( 3, partial(_gameStarted, t) )
	
	GUI.reSort()
開發者ID:siredblood,項目名稱:tree-bumpkin-project,代碼行數:24,代碼來源:GUITest.py


注:本文中的GUI.reSort方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。