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