本文整理匯總了Python中gui.Scaleform.locale.DIALOGS.DIALOGS.recruitwindow_vehicleclassdropdown方法的典型用法代碼示例。如果您正苦於以下問題:Python DIALOGS.recruitwindow_vehicleclassdropdown方法的具體用法?Python DIALOGS.recruitwindow_vehicleclassdropdown怎麽用?Python DIALOGS.recruitwindow_vehicleclassdropdown使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類gui.Scaleform.locale.DIALOGS.DIALOGS
的用法示例。
在下文中一共展示了DIALOGS.recruitwindow_vehicleclassdropdown方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: updateAllDropdowns
# 需要導入模塊: from gui.Scaleform.locale.DIALOGS import DIALOGS [as 別名]
# 或者: from gui.Scaleform.locale.DIALOGS.DIALOGS import recruitwindow_vehicleclassdropdown [as 別名]
def updateAllDropdowns(self, nationID, tankType, typeID, roleType):
nationsDP = [{'id': None,
'label': DIALOGS.RECRUITWINDOW_MENUEMPTYROW}, {'id': nationID,
'label': MENU.nations(nations.NAMES[int(nationID)])}]
classesDP = [{'id': None,
'label': DIALOGS.RECRUITWINDOW_MENUEMPTYROW}, {'id': tankType,
'label': DIALOGS.recruitwindow_vehicleclassdropdown(tankType)}]
typesDP = [{'id': None,
'label': DIALOGS.RECRUITWINDOW_MENUEMPTYROW}]
rolesDP = [{'id': None,
'label': DIALOGS.RECRUITWINDOW_MENUEMPTYROW}]
unlocks = yield StatsRequester().getUnlocks()
modulesAll = yield Requester('vehicle').getFromShop()
for module in modulesAll:
compdecs = module.descriptor.type.compactDescr
if compdecs in unlocks and module.descriptor.type.id[0] == nationID and module.descriptor.type.id[1] == typeID:
typesDP.append({'id': module.descriptor.type.id[1],
'label': module.descriptor.type.shortUserString})
for role in module.descriptor.type.crewRoles:
if role[0] == roleType:
rolesDP.append({'id': role[0],
'label': convert(getSkillsConfig()[role[0]]['userString'])})
break
self.flashObject.as_setAllDropdowns(nationsDP, classesDP, typesDP, rolesDP)
return
示例2: updateAllDropdowns
# 需要導入模塊: from gui.Scaleform.locale.DIALOGS import DIALOGS [as 別名]
# 或者: from gui.Scaleform.locale.DIALOGS.DIALOGS import recruitwindow_vehicleclassdropdown [as 別名]
def updateAllDropdowns(self, nationID, tankType, typeID, roleType):
nationsDP = [{'id': None,
'label': DIALOGS.RECRUITWINDOW_MENUEMPTYROW}, {'id': nationID,
'label': MENU.nations(nations.NAMES[int(nationID)])}]
classesDP = [{'id': None,
'label': DIALOGS.RECRUITWINDOW_MENUEMPTYROW}, {'id': tankType,
'label': DIALOGS.recruitwindow_vehicleclassdropdown(tankType)}]
typesDP = [{'id': None,
'label': DIALOGS.RECRUITWINDOW_MENUEMPTYROW}]
rolesDP = [{'id': None,
'label': DIALOGS.RECRUITWINDOW_MENUEMPTYROW}]
modulesAll = g_itemsCache.items.getVehicles(self.__getRoleCriteria(nationID, tankType, typeID)).values()
modulesAll.sort()
for module in modulesAll:
typesDP.append({'id': module.innationID,
'label': module.shortUserName})
for role in module.descriptor.type.crewRoles:
if role[0] == roleType:
rolesDP.append({'id': role[0],
'label': convert(getSkillsConfig()[role[0]]['userString'])})
break
self.flashObject.as_setAllDropdowns(nationsDP, classesDP, typesDP, rolesDP)
return
示例3: updateVehicleClassDropdown
# 需要導入模塊: from gui.Scaleform.locale.DIALOGS import DIALOGS [as 別名]
# 或者: from gui.Scaleform.locale.DIALOGS.DIALOGS import recruitwindow_vehicleclassdropdown [as 別名]
def updateVehicleClassDropdown(self, nationID):
Waiting.show("updating")
modulesAll = g_itemsCache.items.getVehicles(self.__getClassesCriteria(nationID)).values()
classes = []
data = [{"id": None, "label": DIALOGS.RECRUITWINDOW_MENUEMPTYROW}]
modulesAll.sort()
for module in modulesAll:
if module.type in classes:
continue
classes.append(module.type)
data.append({"id": module.type, "label": DIALOGS.recruitwindow_vehicleclassdropdown(module.type)})
self.flashObject.as_setVehicleClassDropdown(data)
Waiting.hide("updating")
return
示例4: updateVehicleClassDropdown
# 需要導入模塊: from gui.Scaleform.locale.DIALOGS import DIALOGS [as 別名]
# 或者: from gui.Scaleform.locale.DIALOGS.DIALOGS import recruitwindow_vehicleclassdropdown [as 別名]
def updateVehicleClassDropdown(self, nationID):
Waiting.show('updating')
unlocks = yield StatsRequester().getUnlocks()
modulesAll = yield Requester('vehicle').getFromShop()
classes = []
data = [{'id': None,
'label': DIALOGS.RECRUITWINDOW_MENUEMPTYROW}]
modulesAll.sort()
for module in modulesAll:
compdecs = module.descriptor.type.compactDescr
if compdecs in unlocks and module.descriptor.type.id[0] == nationID and module.type not in classes:
classes.append(module.type)
data.append({'id': module.type,
'label': DIALOGS.recruitwindow_vehicleclassdropdown(module.type)})
self.flashObject.as_setVehicleClassDropdown(data)
Waiting.hide('updating')
return
示例5: changeNation
# 需要導入模塊: from gui.Scaleform.locale.DIALOGS import DIALOGS [as 別名]
# 或者: from gui.Scaleform.locale.DIALOGS.DIALOGS import recruitwindow_vehicleclassdropdown [as 別名]
def changeNation(self, nationID):
Waiting.show('updating')
self.__selectedNation = nationID
modulesAll = g_itemsCache.items.getVehicles(self.__getClassesCriteria(nationID)).values()
classes = []
data = [self.__getVehicleClassEmptyRow()]
modulesAll.sort()
for module in modulesAll:
if module.type in classes:
continue
classes.append(module.type)
data.append({'id': module.type,
'label': DIALOGS.recruitwindow_vehicleclassdropdown(module.type)})
self.as_setVehicleClassDataS(self.__getSendingData(data, len(data) > 1, 0))
self.as_setVehicleDataS(self.__getSendingData([self.__getVehicleEmptyRow()], False, 0))
self.as_setTankmanRoleDataS(self.__getSendingData([self.__getTankmanRoleEmptyRow()], False, 0))
Waiting.hide('updating')
self.onDataChange(self.__selectedNation, self.__selectedVehClass, self.__selectedVehicle, self.__selectedTmanRole)