本文整理汇总了Python中WorldEditor.cursorOverGraphicsWnd方法的典型用法代码示例。如果您正苦于以下问题:Python WorldEditor.cursorOverGraphicsWnd方法的具体用法?Python WorldEditor.cursorOverGraphicsWnd怎么用?Python WorldEditor.cursorOverGraphicsWnd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WorldEditor
的用法示例。
在下文中一共展示了WorldEditor.cursorOverGraphicsWnd方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: onKeyEvent
# 需要导入模块: import WorldEditor [as 别名]
# 或者: from WorldEditor import cursorOverGraphicsWnd [as 别名]
def onKeyEvent( self, isDown, key, modifiers ):
if not WorldEditor.cursorOverGraphicsWnd():
return 0
if key == KEY_RIGHTMOUSE:
if ( not self.rightMouseButtonDown ) and isDown:
self.rightMouseButtonDown = 1
self.mouseMoved = 0
elif self.rightMouseButtonDown and not isDown:
self.rightMouseButtonDown = 0
if not self.mouseMoved:
self.onRightMouse()
handled = 0
if self.avatarMode and key == KEY_Q:
self.qDown = isDown
self.eDown = 0
handled = 1
if self.avatarMode and key == KEY_E:
self.eDown = isDown
self.qDown = 0
handled = 1
if not handled:
handled = WorldEditor.camera().handleKeyEvent( isDown, key, modifiers )
if not handled and isDown:
handled = self.ownKeyEvent( key, modifiers )
if not handled and WorldEditor.tool() != None:
handled = WorldEditor.tool().handleKeyEvent( isDown, key, modifiers )
if not handled and isDown and key == KEY_LEFTMOUSE and self.objInfo.overGizmo:
WorldEditor.gizmoClick()
handled = 1
return handled
示例2: deepCopyTemplate
# 需要导入模块: import WorldEditor [as 别名]
# 或者: from WorldEditor import cursorOverGraphicsWnd [as 别名]
if pTemplateSection:
deepCopyTemplate( pChunkSection, pTemplateSection )
group = WorldEditor.createChunk( pChunkSection, \
chunkName, \
self.mouseLocator.subLocator )
if ( group != None ):
self.chunkItemAdded( self.objInfo.getBrowsePath() );
except Exception, e:
WorldEditor.addCommentaryMsg( e.args[0], 1 )
# key event entry point
def onKeyEvent( self, (isDown, key, modifiers), tool ):
if not WorldEditor.cursorOverGraphicsWnd():
return 0
handled = 0
if not isDown and key == KEY_LEFTMOUSE:
self.dragging = 0
if isDown:
if key == KEY_LEFTMOUSE:
self.leftMouseDown = 1
self.onLeftMouse()
handled = 1
if key == KEY_MIDDLEMOUSE:
self.onMiddleMouse()
handled = 1
#elif key == KEY_RETURN: