本文整理匯總了Python中GUI.roots方法的典型用法代碼示例。如果您正苦於以下問題:Python GUI.roots方法的具體用法?Python GUI.roots怎麽用?Python GUI.roots使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GUI
的用法示例。
在下文中一共展示了GUI.roots方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: clear
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import roots [as 別名]
def clear():
for x in GUI.roots():
GUI.delRoot(x)
GUI.mcursor().visible = True
GUI.mcursor().clipped = False
BigWorld.setCursor(GUI.mcursor())
示例2: createMovieGUI
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import roots [as 別名]
def createMovieGUI(file = 'scaleform/d3d9guide.swf'):
m, d = createMovieInstance(file)
import GUI
for i in GUI.roots():
i.position[2] = max(i.position[2], 0.1)
f = GUI.Flash(m)
f.position = (0, 0, 0)
f.focus = True
f.moveFocus = True
GUI.addRoot(f)
showCursor()
return f
示例3: handleMouseEnterEvent
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import roots [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
示例4: _hideTimer
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import roots [as 別名]
def _hideTimer(self):
if self.toggleFromHierarchy:
if self.parent is not None:
if self.component.parent is not None:
self.parent.delChild(self.component)
else:
self.parent.addChild(self.component)
elif self.component in GUI.roots():
GUI.delRoot(self.component)
else:
GUI.addRoot(self.component)
else:
self.component.visible = not self.component.visible
BigWorld.callback(1.0, self._hideTimer)
return
示例5: test
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import roots [as 別名]
def test():
global testUI
for x in GUI.roots():
GUI.delRoot(x)
testUI = ScrollableText().component
GUI.addRoot(testUI)
testUI.script.appendLine('AAAA\nBBBB\\CCCC\nDDDD')
testUI.script.appendLine('XYZ')
testUI.script.appendLine('ABCD')
testUI.script.appendLine('EFG')
testUI.script.appendLine('HIJKL')
testUI.script.appendLine('VRRRRFRF')
testUI.script.appendLine('\\cFF0000FF;test one two three four')
testUI.script.appendLine('\\c00FF00FF;the fat cat sat on the MAT')
testUI.script.appendLine('\\c0000FFFF;The quick brown fox jumped over the lazy dog')
示例6: clearAll
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import roots [as 別名]
def clearAll():
while len(GUI.roots()):
GUI.delRoot(GUI.roots()[0])
示例7: _animatePosition
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import roots [as 別名]
def _animatePosition(self):
self.component.position.x = self.startPosition.x + math.sin(BigWorld.time()) * 0.25
if self.parent is not None and self.parent in GUI.roots() or self.component in GUI.roots():
BigWorld.callback(0.01, self._animatePosition)
return