当前位置: 首页>>代码示例>>Python>>正文


Python DIALOGS.all方法代码示例

本文整理汇总了Python中gui.Scaleform.locale.DIALOGS.DIALOGS.all方法的典型用法代码示例。如果您正苦于以下问题:Python DIALOGS.all方法的具体用法?Python DIALOGS.all怎么用?Python DIALOGS.all使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gui.Scaleform.locale.DIALOGS.DIALOGS的用法示例。


在下文中一共展示了DIALOGS.all方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _showAward

# 需要导入模块: from gui.Scaleform.locale.DIALOGS import DIALOGS [as 别名]
# 或者: from gui.Scaleform.locale.DIALOGS.DIALOGS import all [as 别名]
    def _showAward(self, ctx):
        _, message = ctx
        for dataForVehicle in message.data.values():
            arenaTypeID = dataForVehicle.get('arenaTypeID', 0)
            if arenaTypeID > 0 and arenaTypeID in ArenaType.g_cache:
                arenaType = ArenaType.g_cache[arenaTypeID]
            else:
                arenaType = None
            arenaCreateTime = dataForVehicle.get('arenaCreateTime', None)
            fairplayViolations = dataForVehicle.get('fairplayViolations', None)
            if arenaCreateTime and arenaType and fairplayViolations is not None and fairplayViolations[:2] != (0, 0):
                penaltyType = None
                violation = None
                if fairplayViolations[1] != 0:
                    penaltyType = 'penalty'
                    violation = fairplayViolations[1]
                elif fairplayViolations[0] != 0:
                    penaltyType = 'warning'
                    violation = fairplayViolations[0]
                from gui.DialogsInterface import showDialog
                showDialog(I18PunishmentDialogMeta('punishmentWindow', None, {'penaltyType': penaltyType,
                 'arenaName': i18n.makeString(arenaType.name),
                 'time': TimeFormatter.getActualMsgTimeStr(arenaCreateTime),
                 'reason': i18n.makeString(DIALOGS.all('punishmentWindow/reason/%s' % getFairPlayViolationName(violation)))}), lambda *args: None)

        return
开发者ID:webiumsk,项目名称:WOT-0.9.12-CT,代码行数:28,代码来源:awardcontroller.py

示例2: _showAward

# 需要导入模块: from gui.Scaleform.locale.DIALOGS import DIALOGS [as 别名]
# 或者: from gui.Scaleform.locale.DIALOGS.DIALOGS import all [as 别名]
    def _showAward(self, ctx):
        _, message = ctx
        arenaTypeID = message.data.get("arenaTypeID", 0)
        if arenaTypeID > 0 and arenaTypeID in ArenaType.g_cache:
            arenaType = ArenaType.g_cache[arenaTypeID]
        else:
            arenaType = None
        arenaCreateTime = message.data.get("arenaCreateTime", None)
        fairplayViolations = message.data.get("fairplayViolations", None)
        if arenaCreateTime and arenaType and fairplayViolations is not None and fairplayViolations[:2] != (0, 0):
            penaltyType = None
            violation = None
            if fairplayViolations[1] != 0:
                penaltyType = "penalty"
                violation = fairplayViolations[1]
            elif fairplayViolations[0] != 0:
                penaltyType = "warning"
                violation = fairplayViolations[0]
            from gui.DialogsInterface import showDialog

            showDialog(
                I18PunishmentDialogMeta(
                    "punishmentWindow",
                    None,
                    {
                        "penaltyType": penaltyType,
                        "arenaName": i18n.makeString(arenaType.name),
                        "time": TimeFormatter.getActualMsgTimeStr(arenaCreateTime),
                        "reason": i18n.makeString(
                            DIALOGS.all("punishmentWindow/reason/%s" % getFairPlayViolationName(violation))
                        ),
                    },
                ),
                lambda *args: None,
            )
        return
开发者ID:webiumsk,项目名称:WOT-0.9.12,代码行数:38,代码来源:awardcontroller.py

示例3: getLabels

# 需要导入模块: from gui.Scaleform.locale.DIALOGS import DIALOGS [as 别名]
# 或者: from gui.Scaleform.locale.DIALOGS.DIALOGS import all [as 别名]
 def getLabels(self):
     return [self.__getButtonInfoObject(DIALOG_BUTTON_ID.SUBMIT, DIALOGS.all(I18N_SUBMIT_KEY.format(self._i18nKey)), self._focusedIndex == DIALOG_BUTTON_ID.SUBMIT if self._focusedIndex is not None else True), self.__getButtonInfoObject(DIALOG_BUTTON_ID.CLOSE, DIALOGS.all(I18N_CANCEL_KEY.format(self._i18nKey)), self._focusedIndex == DIALOG_BUTTON_ID.CLOSE if self._focusedIndex is not None else False)]
开发者ID:webiumsk,项目名称:WoT,代码行数:4,代码来源:__init__.py

示例4: _makeString

# 需要导入模块: from gui.Scaleform.locale.DIALOGS import DIALOGS [as 别名]
# 或者: from gui.Scaleform.locale.DIALOGS.DIALOGS import all [as 别名]
 def _makeString(self, key, ctx):
     return i18n.makeString(DIALOGS.all(key), **ctx)
开发者ID:webiumsk,项目名称:WoT,代码行数:4,代码来源:__init__.py


注:本文中的gui.Scaleform.locale.DIALOGS.DIALOGS.all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。