예제 #1
0
    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
예제 #2
0
파일: config.py 프로젝트: GodzillaUA/PYmods
    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))
예제 #3
0
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())
예제 #4
0
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))
예제 #5
0
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)
예제 #7
0
def showI18nDialog(header, text, key, callback):
    from gui.Scaleform.daapi.view.dialogs import I18nConfirmDialogButtons
    showSimpleDialog(header, text, I18nConfirmDialogButtons(key), callback)