Пример #1
0
 def __buildConfirmator(expectedShardsCount, parent, isMegaToysToBreak,
                        hasToysWithAtmosphereBonus):
     textPath = R.strings.ny.confirmBreakToys
     title = backport.text(textPath.title(),
                           count=expectedShardsCount,
                           icon='%(icon)s')
     marginTop = 4
     if hasToysWithAtmosphereBonus:
         title = textPath.atmosphereBonusTitle()
         message = backport.text(textPath.atmosphereBonusMessage(),
                                 count=expectedShardsCount,
                                 icon='%(icon)s')
         marginTop = -1
     elif isMegaToysToBreak:
         message = textPath.megaToysMessage()
     else:
         message = textPath.message()
     shardImage = ImageSubstitution(
         R.images.gui.maps.icons.newYear.shards.c_24x24(), 'icon',
         marginTop)
     builder = ConfirmCancelDialogBuilder()
     builder.setTitle(title, [shardImage])
     builder.setDescription(message, [shardImage])
     builder.setConfirmButtonLabel(textPath.submit())
     builder.setCancelButtonLabel(textPath.cancel())
     return plugins.AsyncDialogConfirmator(dialogs.showSimple,
                                           builder.build(withBlur=True))
Пример #2
0
 def __init__(self, invID, slotID):
     self.__isPaidVehicleSet = False
     confirmators = []
     slot = self.__getSlot(slotID)
     if invID and slot.getCooldown() is not None and self.__festivityFactory.getController().isPostEvent():
         confirmators.append(plugins.AsyncDialogConfirmator(showSetVehicleBranchConfirm, invID, slotID))
         self.__isPaidVehicleSet = True
     super(SetVehicleBranchProcessor, self).__init__(confirmators)
     self.__invID = invID
     self.__slotID = slotID
     return
Пример #3
0
 def __buildConfirmator():
     builder = ResetLootBoxStatisticsBuilder()
     builder.setTitle(
         backport.text(R.strings.ny.confirmResetLootboxStatistics.title()))
     builder.setDescription(
         backport.text(
             R.strings.ny.confirmResetLootboxStatistics.description()))
     builder.setConfirmButtonLabel(
         R.strings.ny.confirmResetLootboxStatistics.submit())
     builder.setCancelButtonLabel(
         R.strings.ny.confirmResetLootboxStatistics.cancel())
     return plugins.AsyncDialogConfirmator(dialogs.showSimple,
                                           builder.build(withBlur=True))
Пример #4
0
 def __init__(self, collectionID, window):
     confirmators = [plugins.AsyncDialogConfirmator(showBuyDialog, window)]
     super(BuyCollectionProcessor, self).__init__(confirmators)
     self.__collectionID = collectionID
Пример #5
0
 def __init__(self, toyInfo, window):
     confirmators = [plugins.AsyncDialogConfirmator(showBuyDialog, window)]
     super(BuyToyProcessor, self).__init__(confirmators)
     self.__toy = toyInfo