本文整理汇总了Python中BugDll.isWidgetVersion方法的典型用法代码示例。如果您正苦于以下问题:Python BugDll.isWidgetVersion方法的具体用法?Python BugDll.isWidgetVersion怎么用?Python BugDll.isWidgetVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BugDll
的用法示例。
在下文中一共展示了BugDll.isWidgetVersion方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: handleInput
# 需要导入模块: import BugDll [as 别名]
# 或者: from BugDll import isWidgetVersion [as 别名]
def handleInput (self, inputClass):
if (inputClass.getNotifyCode() == NotifyCode.NOTIFY_CLICKED):
if (inputClass.getFunctionName() == self.UNIT_LOC_TAB_ID):
self.iScreen = UNIT_LOCATION_SCREEN
self.showUnitLocation()
return 1
elif (inputClass.getFunctionName() == self.SIT_REP_TAB_ID):
self.iScreen = SITUATION_REPORT_SCREEN
self.showSituationReport()
return 1
elif (inputClass.getFunctionName() == self.STRAT_ADV_TAB_ID):
self.iScreen = STRATEGIC_ADVANTAGES_SCREEN
self.showStrategicAdvantages()
return 1
elif (inputClass.getFunctionName() == self.UNIT_BUTTON_ID):
self.bUnitDetails = not self.bUnitDetails
self.UL_refreshUnitSelection(True, True)
return 1
# RJG Start - following line added as per RJG (http://forums.civfanatics.com/showpost.php?p=6997192&postcount=16)
elif (inputClass.getButtonType() == WidgetTypes.WIDGET_LEADERHEAD or BugDll.isWidgetVersion(2, inputClass.getButtonType(), "WIDGET_LEADERHEAD_RELATIONS")):
if (inputClass.getFlags() & MouseFlags.MOUSE_RBUTTONUP):
if (self.iActivePlayer != inputClass.getData1()):
self.getScreen().hideScreen()
return 1
# RJG End
elif (inputClass.getNotifyCode() == NotifyCode.NOTIFY_CHARACTER):
if (inputClass.getData() == int(InputTypes.KB_LSHIFT)
or inputClass.getData() == int(InputTypes.KB_RSHIFT)):
self.iShiftKeyDown = inputClass.getID()
return 1
elif ( inputClass.getNotifyCode() == NotifyCode.NOTIFY_LISTBOX_ITEM_SELECTED ):
if self.iScreen == UNIT_LOCATION_SCREEN:
iSelected = inputClass.getData()
control = inputClass.getFunctionName() + str(inputClass.getID())
BugUtil.debug("Selected item %d from list %s" % (iSelected, control))
if control in self.groupDropDowns:
iGroup = self.groupDropDowns.index(control)
key = self.grouper[iSelected].key
self.groupingKeys[iGroup] = key
self.selectedGroups.clear()
BugUtil.debug("Switched grouping %d to %s" % (iGroup, key))
self.UL_refresh(False, True)
return 1
elif (inputClass.getButtonType() == WidgetTypes.WIDGET_LEADERHEAD):
if (self.iActivePlayer != inputClass.getData1()):
self.getScreen().hideScreen()
return 1
if self.iconGrid:
return self.iconGrid.handleInput(inputClass)
return 0