本文整理汇总了Python中CvScreensInterface.handleBack方法的典型用法代码示例。如果您正苦于以下问题:Python CvScreensInterface.handleBack方法的具体用法?Python CvScreensInterface.handleBack怎么用?Python CvScreensInterface.handleBack使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CvScreensInterface
的用法示例。
在下文中一共展示了CvScreensInterface.handleBack方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: onMouseEvent
# 需要导入模块: import CvScreensInterface [as 别名]
# 或者: from CvScreensInterface import handleBack [as 别名]
def onMouseEvent(self, argsList):
'mouse handler - returns 1 if the event was consumed'
eventType,mx,my,px,py,interfaceConsumed,screens = argsList
if ( px!=-1 and py!=-1 ):
if ( eventType == self.EventLButtonDown ):
if (self.bAllowCheats and self.bCtrl and self.bAlt and CyMap().plot(px,py).isCity() and not interfaceConsumed):
# Launch Edit City Event
self.beginEvent( CvUtil.EventEditCity, (px,py) )
return 1
elif (self.bAllowCheats and self.bCtrl and self.bShift and not interfaceConsumed):
# Launch Place Object Event
self.beginEvent( CvUtil.EventPlaceObject, (px, py) )
return 1
if ( eventType == self.EventBack ):
return CvScreensInterface.handleBack(screens)
elif ( eventType == self.EventForward ):
return CvScreensInterface.handleForward(screens)
return 0