Ejemplo n.º 1
0
 def _onLoading(self, *args, **kwargs):
     self.setSubView(Placeholder.TOP_RIGHT, MoneyBalance())
     self.setSubView(
         Placeholder.TITLE,
         SimpleTextTitle(
             getDemountDialogTitle(self.__item, self.__forFitting)))
     self.__selector = content = SelectOptionContent()
     content.addOption(DemountKitOption(self.__item.intCD))
     self.__moneyOption = MoneyOption(self.removalPrice)
     content.addOption(self.__moneyOption)
     content.setMessage(
         backport.text(R.strings.demount_kit.equipmentDemount.confirmation.
                       description()))
     dk, _ = getDemountKitForOptDevice(self.__item)
     goldEnough = self._isGoldEnough()
     if dk.inventoryCount > 0:
         self._select(DEMOUNT_KIT)
     elif goldEnough:
         self._select(GOLD)
     else:
         self._select(NOTHING)
     self.setSubView(Placeholder.CONTENT, self.__selector)
     self.addButton(ConfirmButton(R.strings.menu.moduleFits.removeName()))
     self.addButton(CancelButton())
     self._itemsCache.onSyncCompleted += self._inventorySyncHandler
     super(DemountOptionalDeviceDialog, self)._onLoading(*args, **kwargs)
Ejemplo n.º 2
0
 def _extendTemplate(self, template):
     super(VehicleBranchDialogBuilder, self)._extendTemplate(template)
     template.setSubView(DefaultDialogPlaceHolders.TOP_RIGHT, MoneyBalance())
     self.__setTitle(template)
     vehicleChangePrice = getVehicleChangePrice()
     template.setSubView(DefaultDialogPlaceHolders.FOOTER, SinglePriceFooter(R.strings.ny.dialogs.setVehicleBranch.price(), ItemPrice(price=vehicleChangePrice, defPrice=vehicleChangePrice), CurrencySize.BIG))
     if self.__slot.getVehicle():
         label = R.strings.ny.dialogs.setVehicleBranch.btnApply()
     else:
         label = R.strings.ny.dialogs.setVehicleBranch.btnSelect()
     template.addButton(CheckMoneyButton(vehicleChangePrice, label, DialogButtons.PURCHASE, ButtonType.MAIN))
     template.addButton(CancelButton())
Ejemplo n.º 3
0
 def _onLoading(self, *args, **kwargs):
     if self.__checkDestroy():
         self._setResult(DialogButtons.CANCEL)
         return
     self.setSubView(DefaultDialogPlaceHolders.TOP_RIGHT, MoneyBalance())
     self.setSubView(DefaultDialogPlaceHolders.TITLE,
                     SimpleTextTitle(self.__getTitleText()))
     self.setSubView(DefaultDialogPlaceHolders.CONTENT,
                     SimpleTextContent(self.__getDescriptionText()))
     self.setSubView(
         DefaultDialogPlaceHolders.ICON,
         IconSet(R.images.gui.maps.uiKit.dialogs.icons.alert(),
                 [R.images.gui.maps.uiKit.dialogs.highlights.red_1()]))
     self.addButton(ConfirmButton(label=_R_PATH.acceptButton()))
     self.addButton(CancelButton(label=_R_PATH.cancelButton()))
     super(DestroyPairModificationsDialog, self)._onLoading(*args, **kwargs)
Ejemplo n.º 4
0
 def _onLoading(self, *args, **kwargs):
     rDK = R.strings.demount_kit
     self.setSubView(Placeholder.TOP_RIGHT, MoneyBalance())
     self.setSubView(Placeholder.ICON, ItemIcon(self.__item.intCD))
     self.setSubView(
         Placeholder.TITLE,
         SimpleTextTitle(
             getDemountDialogTitle(self.__item, self.__forFitting)))
     self.setSubView(
         Placeholder.CONTENT,
         SimpleTextContent(rDK.equipmentDemount.confirmation.description))
     self.setSubView(
         Placeholder.FOOTER,
         SinglePriceFooter(rDK.equipmentDemountPrice, self.itemPrice,
                           CurrencySize.BIG))
     self.addButton(
         CheckMoneyButton(self.itemPrice.price,
                          rDK.demountConfirmation.submit()))
     self.addButton(CancelButton())
     super(DemountOptionalDeviceSinglePriceDialog,
           self)._onLoading(*args, **kwargs)
     self._itemsCache.onSyncCompleted += self._inventorySyncHandler
 def _onLoading(self, *args, **kwargs):
     money = Money(**self.__price) if self.__price else None
     self.setSubView(Placeholder.TITLE, SimpleTextTitle(R.strings.dialogs.dropSkill.fullscreen.title()))
     if not self.__freeDropSave100:
         skillPercent = FULL_REUSE if self.__isBlank else int(self.__price.get('xpReuseFraction', 1) * FULL_REUSE)
         self.setSubView(Placeholder.CONTENT, SimpleTextContent(backport.text(R.strings.dialogs.dropSkill.fullscreen.description(), skillPercent=skillPercent)))
     if not self.__isBlank or self.__freeDropSave100:
         if money and not self.__freeDropSave100:
             self.setSubView(Placeholder.TOP_RIGHT, MoneyBalance())
             self.setSubView(Placeholder.FOOTER, SinglePriceFooter(R.strings.dialogs.common.cost, self.itemPrice, CurrencySize.BIG))
             self.addButton(CheckMoneyButton(money, R.strings.dialogs.dropSkill.fullscreen.ok(), buttonType=ButtonType.MAIN if money.gold > 0 else ButtonType.PRIMARY))
         else:
             self.setSubView(Placeholder.FOOTER, SimpleTextFooter(R.strings.dialogs.dropSkill.fullscreen.costFree()))
             self.addButton(ConfirmButton(R.strings.dialogs.dropSkill.fullscreen.ok()))
     else:
         self.setSubView(Placeholder.FOOTER, BlankPriceView(BLANK_COST_COUNT))
         self.addButton(ConfirmButton(R.strings.dialogs.dropSkill.fullscreen.ok()))
     self.addButton(CancelButton())
     super(SkillDropDialog, self)._onLoading(*args, **kwargs)
     self.__uiEpicBattleLogger.log(EpicBattleLogActions.OPEN.value, item=EpicBattleLogKeys.DROP_SKILL_DIALOG_CONFIRM.value, parentScreen=EpicBattleLogKeys.HANGAR.value)
     self.__uiEpicBattleLogger.initialize(EpicBattleLogKeys.DROP_SKILL_DIALOG_CONFIRM.value)
     return
Ejemplo n.º 6
0
 def _extendTemplate(self, template):
     super(ResDialogBuilder, self)._extendTemplate(template)
     if self.__showBalance:
         template.setSubView(DefaultDialogPlaceHolders.TOP_RIGHT,
                             MoneyBalance())