本文整理匯總了Python中GUI.load方法的典型用法代碼示例。如果您正苦於以下問題:Python GUI.load方法的具體用法?Python GUI.load怎麽用?Python GUI.load使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GUI
的用法示例。
在下文中一共展示了GUI.load方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: init_gui
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import load [as 別名]
def init_gui():
try:
import GUI
ctx = GUI()
ctx.load()
return ctx
except ImportError:
# not in offline mode
class GUIStub(object):
def __getattr__(self, name):
return lambda _self: None
return GUIStub()
示例2: testWindow
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import load [as 別名]
def testWindow():
BigWorld.camera(BigWorld.CursorCamera())
BigWorld.setCursor(GUI.mcursor())
GUI.mcursor().visible = True
clear()
w = GUI.load('gui/tests/window.gui')
GUI.addRoot(w)
return w
示例3: createStriffFeed
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import load [as 別名]
def createStriffFeed():
camera = BigWorld.FreeCamera()
m = Math.Matrix()
m.setRotateYPR((2.69752, 0.467126, 0.0))
m.translation = (-36.5, 28.6, 87.46)
s = GUI.load('gui/video_feed.gui')
camera.set(m)
s.script.active(1, camera)
return s
示例4: addToolTipTemplate
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import load [as 別名]
def addToolTipTemplate(self, templateName, guiFileName):
if not self.toolTipGUIs.has_key(templateName):
toolTipGUI = GUI.load(guiFileName)
toolTipGUI.horizontalAnchor = 'CENTER'
toolTipGUI.verticalAnchor = 'CENTER'
toolTipGUI.horizontalPositionMode = 'CLIP'
toolTipGUI.verticalPositionMode = 'CLIP'
toolTipGUI.position.z = self.toolTipZOrder
self.toolTipGUIs[templateName] = toolTipGUI
return self.toolTipGUIs[templateName]
示例5: Main
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import load [as 別名]
def Main():
#Display 'Welcome screen', with no secondary text
GUI.load("StartScreen","")
time.sleep(5)
#Configure playlists - update secondary text to update user
GUI.load("StartScreen", "Loading Playlists")
playlists.refresh("All")
GUI.load("StartScreen", "Playlists Loaded")
time.sleep(1)
#Display Message to indicate ready to go
GUI.load("PressAnyKey","")
#Start to monitor buttons
while True:
buttons.CheckForKeyPress()
示例6: openHealthBar
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import load [as 別名]
def openHealthBar( self ):
self.healthBar = GUI.load( "guis/healthBar.gui" )
self.hbClipper = GUI.ClipShader("RIGHT")
self.hbClipper.speed = 1
self.hbClipper.value = 1
self.hbColour = GUI.ColourShader()
self.hbColour.start =(255,0,0,220)
self.hbColour.middle = (120,120,0,220)
self.hbColour.end = (0,255,0,220)
self.hbColour.speed = 1
self.hbColour.value = 1
self.healthBar.addShader(self.hbClipper)
self.healthBar.addShader(self.hbColour)
GUI.addRoot(self.healthBar)
示例7: createItem
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import load [as 別名]
def createItem(self):
raise self.itemGuiName != '' or AssertionError
g = GUI.load(self.itemGuiName)
setattr(self.items, 'm%d' % (len(self.items.children),), g)
g.script.doLayout(self)
return g
示例8: weather
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import load [as 別名]
def weather():
global weatherWindow
setup()
weatherWindow = GUI.load('gui/weather_window.gui')
GUI.addRoot(weatherWindow)
return weatherWindow
示例9: clone
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import load [as 別名]
def clone(component):
ResMgr.purge('gui/temp_clone.gui', True)
component.save('gui/temp_clone.gui')
return GUI.load('gui/temp_clone.gui')