def atCall(self, cd): vehicleItem = g_itemsCache.items.getItem(GUI_ITEM_TYPE.VEHICLE, cd.self.nationID, cd.self.inNationID) if self.__vehicle_is_available(vehicleItem): return None else: cd.avoid() def dialogButtonClickHandler(confirm): if confirm: BigWorld.callback( 0.1, lambda: cd.self._VehicleBuyWindow__requestForBuy( cd.args[0])) else: cd.self.as_setEnabledSubmitBtnS(True) showDialog( SimpleDialogMeta(title=_ms('#miniclient:buy_vehicle/title'), message=icons.alert() + _ms('#miniclient:buy_vehicle/message'), buttons=I18nConfirmDialogButtons( i18nKey='questsConfirmDialog', focusedIndex=DIALOG_BUTTON_ID.SUBMIT)), dialogButtonClickHandler) return None
def py_onRequestVehicleDelete(self, teamIdx): from gui import DialogsInterface from gui.Scaleform.daapi.view.dialogs import SimpleDialogMeta, I18nConfirmDialogButtons DialogsInterface.showDialog(SimpleDialogMeta(g_config.i18n['UI_flash_WLVehDelete_header'], g_config.i18n['UI_flash_WLVehDelete_text'], I18nConfirmDialogButtons('common/confirm'), None), lambda proceed: self.flashObject.as_onVehicleDeleteConfirmed(proceed, teamIdx))
def confirmReserveVehicle(self): try: showDialog( SimpleDialogMeta(l10n('reserve_confirm_title'), l10n('reserve_confirm_message'), I18nConfirmDialogButtons()), partial(checkReserveVehicle, self.vehCD)) except Exception as ex: err(traceback.format_exc())
def _show_continue_client_download_dialog(): showDialog( SimpleDialogMeta( title=_ms('#miniclient:continue_download_dialog/title'), message=_ms('#miniclient:continue_download_dialog/message'), buttons=I18nConfirmDialogButtons( focusedIndex=DIALOG_BUTTON_ID.SUBMIT, i18nKey='questsConfirmDialog')), lambda proceed: (BigWorld.wg_quitAndStartLauncher() if proceed else None))
def _SquadActionsHandler_confirmCallback(base, self, result): if not result: return try: if battle_tiers_difference >= WARN_SQUAD_BATTLETIER_DIFFERENCE: showDialog( SimpleDialogMeta( l10n('Warning'), l10n('Squad tanks battle tiers difference') + ': %s.' % battle_tiers_difference, I18nConfirmDialogButtons()), partial(base, self)) return True except Exception, ex: err(traceback.format_exc())
def __init__(self, key, subKey='', titleCtx=None, messageCtx=None, focusedID=None): _key = 'stronghold/{0}{1}' buttons = I18nConfirmDialogButtons(_key.format(key, ''), focusedID) super(StrongholdConfirmDialogMeta, self).__init__(_key.format(key, subKey), buttons, titleCtx, messageCtx, scope=VIEW_SCOPE)
def showI18nDialog(header, text, key, callback): from gui.Scaleform.daapi.view.dialogs import I18nConfirmDialogButtons showSimpleDialog(header, text, I18nConfirmDialogButtons(key), callback)