当前位置: 首页>>代码示例>>Python>>正文


Python CvScreensInterface.pediaJumpToCivic方法代码示例

本文整理汇总了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
开发者ID:Imperator-Knoedel,项目名称:RFC-Dawn-of-Knoedel,代码行数:61,代码来源:CvCivicsScreen.py

示例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
开发者ID:kojim,项目名称:touhou-jojisi-SDK,代码行数:21,代码来源:CvCivicsScreen.py


注:本文中的CvScreensInterface.pediaJumpToCivic方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。