本文整理汇总了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)