def romePopup(self, argsList):
iPlayerNum = 0
for iPlayer in range(gc.getMAX_PLAYERS()):
player = gc.getPlayer(iPlayer)
if player.isAlive():
iPlayerNum = iPlayerNum + 1
if player.isHuman():
popupInfo = CyPopupInfo()
popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON)
popupInfo.setText(CyTranslator().setText("The Latin citizens of Rome have declared their independence. They lay claim to all of Italy. Will you recognize their sovereignty? Refusal will mean war.",()))
popupInfo.setData1(iPlayer)
popupInfo.setOnClickedPythonCallback("classicalButtons")
popupInfo.addPythonButton(CyTranslator().setText("Yes", ()), "")
popupInfo.addPythonButton(CyTranslator().setText("No", ()), "")
popupInfo.addPopup(iPlayer)
#this goes in my custom CvScreensInterface.py
def classicalButtons(argsList):
iButtonId = argsList[0]
iData1 = argsList[1]
iData2 = argsList[2]
iData3 = argsList[3]
iData4 = argsList[4]
szText = argsList[5]
bOption1 = argsList[6]
bOption2 = argsList[7]
if iButtonId == 0:
DawnOfTime.classicalSpawn()
if iButtonId == 1:
DawnOfTime.classicalWar()