本文整理汇总了Python中CvScreensInterface.showAchieveAdvisorScreen方法的典型用法代码示例。如果您正苦于以下问题:Python CvScreensInterface.showAchieveAdvisorScreen方法的具体用法?Python CvScreensInterface.showAchieveAdvisorScreen怎么用?Python CvScreensInterface.showAchieveAdvisorScreen使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CvScreensInterface
的用法示例。
在下文中一共展示了CvScreensInterface.showAchieveAdvisorScreen方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: onKbdEvent
# 需要导入模块: import CvScreensInterface [as 别名]
# 或者: from CvScreensInterface import showAchieveAdvisorScreen [as 别名]
def onKbdEvent(self, argsList):
'keypress handler - return 1 if the event was consumed'
eventType,key,mx,my,px,py = argsList
game = gc.getGame()
if (self.bAllowCheats):
# notify debug tools of input to allow it to override the control
argsList = (eventType,key,self.bCtrl,self.bShift,self.bAlt,mx,my,px,py,gc.getGame().isNetworkMultiPlayer())
if ( CvDebugTools.g_CvDebugTools.notifyInput(argsList) ):
return 0
if ( eventType == self.EventKeyDown ):
theKey=int(key)
CvCameraControls.g_CameraControls.handleInput( theKey )
# Dale - AoD: AoDCheatMenu START
if (self.bAllowCheats): # TAC - Multiplayer - koma13
if( theKey == int(InputTypes.KB_Z) and self.bShift and self.bCtrl ) :
self.beginEvent(CvUtil.EventAoDCheatMenu)
# Dale - AoD: AoDCheatMenu END
# Achievements START
if( theKey == int(InputTypes.KB_F10) and not self.bShift and not self.bCtrl ) :
CvScreensInterface.showAchieveAdvisorScreen()
# Achievements END
# TAC: EventTriggerMenu START
# Shift+Ctrl+E im Cheatmodus
if( theKey == int(InputTypes.KB_E) and self.bShift and self.bCtrl and self.bAllowCheats) :
ePlayer = gc.getGame().getActivePlayer()
popupInfo = CyPopupInfo()
popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON)
popupInfo.setText(CyTranslator().getText("TXT_KEY_POPUP_SELECT_EVENT",()))
popupInfo.setData1(ePlayer)
popupInfo.setOnClickedPythonCallback("selectOneEvent")
popupInfo.addPythonButton(CyTranslator().getText("TXT_KEY_POPUP_SELECT_NEVER_MIND", ()), "")
for i in range(gc.getNumEventTriggerInfos()):
trigger = gc.getEventTriggerInfo(i)
name = trigger.getType().replace("EVENTTRIGGER_", "").replace("_", " ").title()
popupInfo.addPythonButton(name, "")
# popupInfo.addPythonButton(str(trigger.getType()), "")
popupInfo.addPythonButton(CyTranslator().getText("TXT_KEY_POPUP_SELECT_NEVER_MIND", ()), "")
popupInfo.addPopup(ePlayer)
# TAC: EventTriggerMenu END
if (self.bAllowCheats):
# Shift - T (Debug - No MP)
if (theKey == int(InputTypes.KB_T)):
if ( self.bShift ):
self.beginEvent(CvUtil.EventAwardGold)
#self.beginEvent(CvUtil.EventCameraControlPopup)
return 1
# TAC: Wonder Movie Cheat disabled
#elif (theKey == int(InputTypes.KB_W)):
# if ( self.bShift and self.bCtrl):
# self.beginEvent(CvUtil.EventShowWonder)
# return 1
# Shift - ] (Debug - currently mouse-overd unit, health += 10
elif (theKey == int(InputTypes.KB_LBRACKET) and self.bShift ):
unit = CyMap().plot(px, py).getUnit(0)
if ( not unit.isNone() ):
d = min( unit.maxHitPoints()-1, unit.getDamage() + 10 )
unit.setDamage( d )
# Shift - [ (Debug - currently mouse-overd unit, health -= 10
elif (theKey == int(InputTypes.KB_RBRACKET) and self.bShift ):
unit = CyMap().plot(px, py).getUnit(0)
if ( not unit.isNone() ):
d = max( 0, unit.getDamage() - 10 )
unit.setDamage( d )
elif (theKey == int(InputTypes.KB_F1)):
if ( self.bShift ):
CvScreensInterface.replayScreen.showScreen(False)
return 1
# don't return 1 unless you want the input consumed
return 0