def YourBox(self):
popup = PyPopup.PyPopup(CvUtil.EventYourPopup, contextType = EventContextTypes.EVENTCONTEXT_ALL)
szTitle = localText.getText("TXT_KEY_YOUR_TITLE", ())
szText = localText.getText("TXT_KEY_YOUR_TEXT", ())
ListTypes = {
0 : 'Option1',
1 : 'Option2',
2 : 'Option3',
}
popup.setHeaderString(szTitle)
popup.addSeparator()
popup.setBodyString(szText)
popup.addSeparator()
popup.createPythonPullDown('Select an option', 3)
for i in range(0, len(ListTypes)):
popup.addPullDownString(ListTypes[i], i, 3)
popup.popup.setSelectedPulldownID(1, 3)
popup.addSeparator()
popup.launch()
def YourBoxHandler(self, playerID, netUserData, popupReturn):
autoIdx = popupReturn.getSelectedPullDownValue(3)
if(autoIdx == 0):
# do **** here
elif(autoIdx == 1):
# do **** here
elif(autoIdx == 2):
# do **** here