Exemplo n.º 1
0
 def __createSimpleTooltip(self, event, header='', body=''):
     window = DecoratedTooltipWindow(content=SimpleTooltipContent(
         _R_SIMPLE_TOOLTIP(), body=body, header=header),
                                     parent=self.getParentWindow())
     window.load()
     window.move(event.mouse.positionX, event.mouse.positionY)
     return window
Exemplo n.º 2
0
 def __WGMNotAvailableTooltipFactory(currency):
     params = NO_WGM_TOOLTIP_DATA.get(currency, {'header': '', 'body': ''})
     return SimpleTooltipContent(
         R.views.common.tooltip_window.simple_tooltip_content.
         SimpleTooltipContent(),
         header=backport.text(params['header']),
         body=backport.text(params['body']))
Exemplo n.º 3
0
 def createToolTipContent(self, event, contentID):
     if contentID == R.views.lobby.new_year.tooltips.NyShardsTooltip():
         tooltipData = self.__tooltips[event.getArgument('tooltipId')]
         return SimpleTooltipContent(
             contentID=R.views.common.tooltip_window.simple_tooltip_content.
             SimpleTooltipContent(),
             body=backport.text(R.strings.ny.fragments.tooltip(),
                                count=tooltipData.specialArgs[0]))
     tooltipData = getBackportTooltipData(event, self.__tooltips)
     return getTooltipContent(event, tooltipData)
 def createToolTipContent(self, event, contentID):
     if contentID == R.views.common.tooltip_window.backport_tooltip_content.BackportTooltipContent(
     ):
         tooltipId = event.getArgument('tooltipId')
         if tooltipId == TooltipConstants.SUBTITLE:
             return SimpleTooltipContent(
                 R.views.common.tooltip_window.simple_tooltip_content.
                 SimpleTooltipContent(),
                 body=loc(R.strings.tooltips.accountCompletion.email.
                          titleTooltip()))
         return super(SteamAddEmailOverlayView,
                      self).createToolTipContent(event, contentID)
Exemplo n.º 5
0
 def createToolTipContent(self, event, contentID):
     if contentID == _R_SIMPLE_TOOLTIP():
         return SimpleTooltipContent(contentID,
                                     event.getArgument('header', ''),
                                     event.getArgument('body', ''),
                                     event.getArgument('note', ''),
                                     event.getArgument('alert', ''))
     elif contentID == R.views.lobby.mode_selector.tooltips.SimplyFormatTooltip(
     ):
         modeName = event.getArgument('modeName', '')
         if modeName is None:
             return
         tooltipLocal = R.strings.mode_selector.mode.dyn(modeName)
         if not tooltipLocal:
             return
         header = backport.text(tooltipLocal.battlePassTooltip.header())
         body = backport.text(tooltipLocal.battlePassTooltip.body())
         if not header:
             return
         return SimplyFormatTooltipView(header, body)
     else:
         tooltipClass = self.__tooltipByContentID.get(contentID)
         return tooltipClass() if tooltipClass else None
Exemplo n.º 6
0
 def _createSimpleTooltipContent(self, header, body):
     contentID = R.views.common.tooltip_window.simple_tooltip_content.SimpleTooltipContent()
     return SimpleTooltipContent(contentID=contentID, header=header, body=body)