本文整理汇总了Python中CvScreensInterface.pediaJumpToCivic方法的典型用法代码示例。如果您正苦于以下问题:Python CvScreensInterface.pediaJumpToCivic方法的具体用法?Python CvScreensInterface.pediaJumpToCivic怎么用?Python CvScreensInterface.pediaJumpToCivic使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CvScreensInterface
的用法示例。
在下文中一共展示了CvScreensInterface.pediaJumpToCivic方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: handleInput
# 需要导入模块: import CvScreensInterface [as 别名]
# 或者: from CvScreensInterface import pediaJumpToCivic [as 别名]
def handleInput(self, inputClass):
'Handles input for this screen'
if inputClass.getNotifyCode() == NotifyCode.NOTIFY_LISTBOX_ITEM_SELECTED:
screen = self.getScreen()
iIndex = screen.getSelectedPullDownID("DebugMenu")
self.setActivePlayer(screen.getPullDownData("DebugMenu", iIndex))
self.placeContents()
self.updateCivicCosts()
self.updateRevolution()
return 1
elif inputClass.getFunctionName().startswith("CivicButton") or inputClass.getFunctionName().startswith("CivicName"):
if inputClass.getNotifyCode() == NotifyCode.NOTIFY_CLICKED:
if inputClass.getFlags() & MouseFlags.MOUSE_RBUTTONUP:
CvScreensInterface.pediaJumpToCivic((inputClass.getID(), ))
else:
# Select civic
self.selectCivic(inputClass.getID())
self.showCivic(gc.getCivicInfo(inputClass.getID()).getCivicOptionType())
self.updateCivicCosts()
self.updateRevolution()
elif inputClass.getNotifyCode() == NotifyCode.NOTIFY_CURSOR_MOVE_ON:
self.colorCivicTexts(inputClass.getID(), True)
if self.hoverCivic(inputClass.getID(), True):
# Highlight button
self.showCivic(gc.getCivicInfo(inputClass.getID()).getCivicOptionType())
self.updateCivicCosts()
self.updateRevolution()
elif inputClass.getNotifyCode() == NotifyCode.NOTIFY_CURSOR_MOVE_OFF:
self.colorCivicTexts(inputClass.getID(), False)
if self.hoverCivic(inputClass.getID(), False):
# Unhighlight button
self.showCivic(gc.getCivicInfo(inputClass.getID()).getCivicOptionType())
self.updateCivicCosts()
self.updateRevolution()
return 1
elif inputClass.getFunctionName().startswith("CivicIcon"):
if inputClass.getNotifyCode() == NotifyCode.NOTIFY_CLICKED:
CvScreensInterface.pediaJumpToCivic((inputClass.getData1(), ))
elif inputClass.getFunctionName() == "RevolutionButton":
self.doRevolution()
return 1
elif inputClass.getFunctionName() == "CancelButton":
for i in xrange(gc.getNumCivicOptionInfos()):
self.SelectedCivics[i] = self.PlayerCivics[i]
self.DisplayedCivics[i] = self.PlayerCivics[i]
self.placeContents()
self.updateCivicCosts()
self.updateRevolution()
return 1
return 0
示例2: CivicsButton
# 需要导入模块: import CvScreensInterface [as 别名]
# 或者: from CvScreensInterface import pediaJumpToCivic [as 别名]
def CivicsButton(self, inputClass):
if (inputClass.getNotifyCode() == NotifyCode.NOTIFY_CLICKED) :
if (inputClass.getFlags() & MouseFlags.MOUSE_RBUTTONUP):
CvScreensInterface.pediaJumpToCivic((inputClass.getID(), ))
else:
# Select button
self.select(inputClass.getID())
self.drawHelpText(gc.getCivicInfo(inputClass.getID()).getCivicOptionType())
self.updateAnarchy()
elif (inputClass.getNotifyCode() == NotifyCode.NOTIFY_CURSOR_MOVE_ON) :
# Highlight this button
if self.highlight(inputClass.getID()):
self.drawHelpText(gc.getCivicInfo(inputClass.getID()).getCivicOptionType())
self.updateAnarchy()
elif (inputClass.getNotifyCode() == NotifyCode.NOTIFY_CURSOR_MOVE_OFF) :
if self.unHighlight(inputClass.getID()):
self.drawHelpText(gc.getCivicInfo(inputClass.getID()).getCivicOptionType())
self.updateAnarchy()
return 0