本文整理匯總了Python中GUI.update方法的典型用法代碼示例。如果您正苦於以下問題:Python GUI.update方法的具體用法?Python GUI.update怎麽用?Python GUI.update使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GUI
的用法示例。
在下文中一共展示了GUI.update方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: updateState
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import update [as 別名]
def updateState( self, dTime ):
GUI.update( dTime )
self.cc.update( dTime )
BigBang.update( dTime )
BigBang.camera().update( dTime )
BigBang.fudgeOrthographicMode( 1500.0, 0.01 )
return 1
示例2: updateState
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import update [as 別名]
def updateState( self, dTime ):
"""This function forces an update to be called in World Editor.
Usually called everyframe, however it still recieves a dTime
value which informs the update function how much time has passed
since the last update call."""
# detect a change of space, and act accordingly
if self.currentSpace != WorldEditor.getOptionString( "space/mru0" ):
self.currentSpace = WorldEditor.getOptionString( "space/mru0" )
# make sure the chunk viz resolution is set correctly
self.enterChunkVizMode()
GUI.update( dTime )
self.cc.update( dTime )
WorldEditor.camera().update( dTime )
if ( WorldEditor.tool() != None and not WorldEditor.tool().applying ):
self.objInfo.overGizmo = WorldEditor.gizmoUpdate( WorldEditor.worldRay() )
# update the WorldEditor
WorldEditor.update( dTime )
# update tool views
base = dTime / 5
self.alphaToolTextureView.rotation += base * (1 + (self.alphaTool.strength / 650))
self.heightView.rotation += base * (1 + (self.heightTool.strength / 650))
self.filterToolTextureView.rotation += base
if self.nextTimeDoSelUpdate == 2:
self.itemTool.functor.script.restoreOldSelection()
self.nextTimeDoSelUpdate = 0
elif self.nextTimeDoSelUpdate == 1:
self.itemTool.functor.script.clearAndSaveSelection()
self.nextTimeDoSelUpdate = 2
if WorldEditor.isInPlayerPreviewMode() and not self.avatarMode:
WorldEditor.addCommentaryMsg( "entered avatar walkthrough mode." )
self.avatarMode = 1
if self.avatarMode and not WorldEditor.isInPlayerPreviewMode():
self.qDown = 0
self.eDown = 0
self.avatarMode = 0
if self.avatarMode:
value = WorldEditor.getOptionString( "camera/speed" )
speed = 1
if value == "Medium":
speed = 2
if value == "Fast":
speed = 3
if value == "SuperFast":
speed = 4
if self.qDown and WorldEditor.getOptionInt( "graphics/cameraHeight" ) - speed <= 2:
WorldEditor.setOptionInt( "graphics/cameraHeight", 2 )
if self.qDown and WorldEditor.getOptionInt( "graphics/cameraHeight" ) > 2:
WorldEditor.setOptionInt( "graphics/cameraHeight", WorldEditor.getOptionInt( "graphics/cameraHeight" ) - speed )
if self.eDown:
WorldEditor.setOptionInt( "graphics/cameraHeight", WorldEditor.getOptionInt( "graphics/cameraHeight" ) + speed )
WorldEditor.snapCameraToTerrain()
if WorldEditor.tool() == bd.alphaTool:
bd.alphaTool.size = WorldEditor.getOptionFloat ( "terrain/texture/size" )
bd.alphaTool.strength = WorldEditor.getOptionFloat ( "terrain/texture/strength" )
bd.alphaTool.functor.displayOverlay = WorldEditor.getOptionInt ( "terrain/texture/maskoverlay" )
WorldEditor.setPaintLayer(bd.alphaTool.functor.lastPaintedLayer)
WorldEditor.setPaintPos(bd.alphaTool.functor.lastPaintedPos)
if bd.alphaTool.functor.hadEscapeKey != 0:
WorldEditor.setTerrainPaintEscKey(bd.alphaTool.functor.hadEscapeKey)
bd.alphaTool.functor.hadEscapeKey = 0
bd.heightTool.size = WorldEditor.getOptionFloat ( "terrain/height/size" )
bd.heightTool.strength = WorldEditor.getOptionFloat ( "terrain/height/strength" )
bd.setHeightFunctor.height = WorldEditor.getOptionFloat ( "terrain/height/height" )
bd.setHeightFunctor.relative = WorldEditor.getOptionInt ( "terrain/height/relative" )
bd.heightFunctor.falloff = WorldEditor.getOptionInt ( "terrain/height/brushFalloff" )
bd.filterTool.size = WorldEditor.getOptionFloat ( "terrain/filter/size" )
bd.filterTool.functor.index = WorldEditor.getOptionInt ( "terrain/filter/index" )
bd.holeTool.size = WorldEditor.getOptionFloat ( "terrain/cutRepair/size" )
bd.holeTool.functor.fillNotCut = WorldEditor.getOptionInt ( "terrain/cutRepair/brushMode" )
if self.needsChunkVizUpdate:
self.enterChunkVizMode()
return 1
示例3: updateState
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import update [as 別名]
def updateState( self, dTime ):
GUI.update( dTime )
BigBang.update( dTime )
BigBang.camera().update( dTime )
return 1