def ApplyAttributes(self, attributes):
     Transform.ApplyAttributes(self, attributes)
     degree = attributes.degree
     radians = mathUtil.DegToRad(degree)
     self.rotation = -radians
     self.actionDistance = attributes.sizeInfo.actionDistance
     self.degree = degree
示例#2
0
 def ApplyAttributes(self, attributes):
     Transform.ApplyAttributes(self, attributes)
     self.tokenSize = attributes.get('tokenSize', self.default_tokenSize)
     self.closeCallback = attributes.get('closeCallback', None)
     self.textColor = attributes.get('textColor', redeemColors.TEXT_COLOR)
     self.padLeft = attributes.get('itemPadding', self.default_itemPadding)
     self.padRight = attributes.get('itemPadding', self.default_itemPadding)
     self.minimized = attributes.get('minimized', False)
     self.redeemTokenData = attributes.redeemTokenData
     self.isDragObject = attributes.dragEnabled
     self.typeID = self.redeemTokenData.typeID
     quantity = self.redeemTokenData.quantity
     portionSize = self.redeemTokenData.portionSize
     totalQuantity = quantity * portionSize
     self.desc = attributes.desc
     self.expireDateTime = self.redeemTokenData.expireDateTime
     self.width = self.tokenSize
     self.height = self.GetTokenHeight()
     self.itemCont = Container(parent=self, name='itemCont', align=uiconst.TOTOP, state=uiconst.UI_PICKCHILDREN, height=self.tokenSize, width=self.tokenSize, padTop=REDEEM_TOKEN_TOP_PADDING)
     self.iconCont = Container(parent=self.itemCont, name='iconCont', align=uiconst.TOTOP, state=uiconst.UI_DISABLED, width=self.tokenSize, height=self.tokenSize)
     if not self.minimized:
         self.CreateAdditionalInformation()
     self.highlightOverlay = uiprimitives.Sprite(name='hilite', align=uiconst.TOALL, state=uiconst.UI_DISABLED, parent=self.iconCont, texturePath='res:/UI/Texture/classes/InvItem/bgHover.png', blendMode=trinity.TR2_SBM_ADD, opacity=0.0, idx=0)
     uiprimitives.Sprite(bgParent=self.iconCont, name='background', texturePath='res:/UI/Texture/classes/InvItem/bgNormal.png')
     self.icon = uicontrols.Icon(parent=self.iconCont, name='icon', align=uiconst.CENTER, state=uiconst.UI_DISABLED, typeID=self.typeID, size=self.tokenSize)
     self.quantityContainer = Container(parent=self.iconCont, name='quantityContainer', idx=0, pos=(0, 53, 32, 11), align=uiconst.TOPRIGHT, state=uiconst.UI_DISABLED, bgColor=(0, 0, 0, 0.95))
     self.quantityLabel = uicontrols.Label(parent=self.quantityContainer, left=2, maxLines=1, fontsize=9, color=self.textColor, text=totalQuantity)
     self.isNew = False
     self.tooltipPanelClassInfo = TooltipHeaderDescriptionWrapper(header=self.redeemTokenData.typeName, description=self.GenerateHintText())
     self.scale = (0.0, 0.0)
示例#3
0
 def ApplyAttributes(self, attributes):
     Transform.ApplyAttributes(self, attributes)
     self.controller = attributes.controller
     self.utilButtons = []
     self._emptyHint, self._emptyTooltip = self.PrimeToEmptySlotHint()
     self.controller.on_online_state_change.connect(
         self.UpdateOnlineDisplay)
     self.controller.on_item_fitted.connect(self.UpdateFitting)
     self.hilitedFromMathing = False
示例#4
0
 def ApplyAttributes(self, attributes):
     Transform.ApplyAttributes(self, attributes)
     labelText = attributes.text
     wrapWidth = attributes.get('wrapWidth', self.default_wrapWidth)
     labelClass = attributes.get('labelClass', EveLabelSmall)
     self.label = labelClass(text=labelText, parent=self, maxLines=2, wrapWidth=wrapWidth)
     self.width = self.label.width
     self.height = self.label.height
     self.rotation = attributes.get('rotation', self.default_rotation)
     self.rotationCenter = attributes.get('rotationCenter', self.default_rotationCenter)
示例#5
0
 def ApplyAttributes(self, attributes):
     Transform.ApplyAttributes(self, attributes)
     self.display = attributes.Get('display', True)
     self.isExpanded = False
     self.buttonDict = {}
     self.sizeInfo = attributes.sizeInfo
     self.buttonWidth = attributes.sizeInfo.buttonWidth
     self.actionDistance = attributes.sizeInfo.actionDistance
     self.actionButtonTopPadding = attributes.sizeInfo.buttonPaddingTop
     self.buttonBackgroundOpacity = attributes.Get('buttonBackgroundOpacity', 0.8)
     self.usePreciseRanges = attributes.Get('usePreciseRanges', True)
示例#6
0
 def ApplyAttributes(self, attributes):
     Transform.ApplyAttributes(self, attributes)
     borderColor = attributes.get('borderColor',
                                  redeemColors.REDEEM_BUTTON_BORDER_COLOR)
     backgroundColor = attributes.get(
         'backgroundColor', redeemColors.REDEEM_BUTTON_BACKGROUND_COLOR)
     fillColor = attributes.get('fillColor',
                                redeemColors.REDEEM_BUTTON_FILL_COLOR)
     textColor = attributes.get('textColor', redeemColors.TEXT_COLOR)
     uiprimitives.Line(parent=self,
                       color=borderColor,
                       align=uiconst.TOTOP,
                       weight=1)
     uiprimitives.Fill(bgParent=self, color=backgroundColor)
     borderFillColor = fillColor[:3]
     self.borderFill = uicontrols.GradientSprite(bgParent=self,
                                                 rgbData=[
                                                     (0, borderFillColor),
                                                     (0.5, borderFillColor),
                                                     (1.0, borderFillColor)
                                                 ],
                                                 alphaData=[(0.3, 0.1),
                                                            (0.5, 0.4),
                                                            (0.7, 0.1)],
                                                 idx=0,
                                                 state=uiconst.UI_DISABLED)
     self.OnClick = attributes.get('OnClick', self.DefaultOnClick)
     self.captionCont = Container(parent=self,
                                  name='captionCont',
                                  align=uiconst.CENTERTOP)
     self.expanderIcon = uiprimitives.Sprite(
         parent=self.captionCont,
         texturePath='res:/UI/Texture/Icons/105_32_5.png',
         align=uiconst.CENTERRIGHT,
         pos=(0, 0, 32, 32),
         state=uiconst.UI_DISABLED,
         color=textColor)
     self.availableLabel = uicontrols.EveCaptionMedium(
         parent=self.captionCont,
         align=uiconst.CENTERLEFT,
         text=localization.GetByLabel('UI/RedeemWindow/RedeemableItems'),
         state=uiconst.UI_DISABLED,
         color=textColor,
         bold=False)
     self.availableLabel.letterspace = 1
     self.captionCont.width = self.availableLabel.textwidth + 10 + self.expanderIcon.width
     self.captionCont.height = max(self.availableLabel.textheight + 10,
                                   self.expanderIcon.height)
     self.height = self.captionCont.height
示例#7
0
 def ApplyAttributes(self, attributes):
     Transform.ApplyAttributes(self, attributes)
     self.display = False
     rangeSize = attributes.rangeSize
     self.rangeMeterLeftSide = SpriteThemeColored(parent=self, name='rangeMeterLeftSide', pos=(0,
      0,
      rangeSize,
      rangeSize), state=uiconst.UI_PICKCHILDREN, texturePath='res:/UI/Texture/classes/RadialMenu/rangeMaskL.png', textureSecondaryPath='res:/UI/Texture/classes/RadialMenu/gaugeFill.png', colorType=uiconst.COLORTYPE_UIHILIGHTGLOW, opacity=0.5, align=uiconst.CENTER, blendMode=1, spriteEffect=trinity.TR2_SFX_MODULATE)
     self.rangeMeterLeftSide.display = True
     self.rangeMeterRightSide = SpriteThemeColored(parent=self, name='rangeMeterRightSide', pos=(0,
      0,
      rangeSize,
      rangeSize), state=uiconst.UI_PICKCHILDREN, texturePath='res:/UI/Texture/classes/RadialMenu/rangeMaskR.png', textureSecondaryPath='res:/UI/Texture/classes/RadialMenu/gaugeFill.png', colorType=uiconst.COLORTYPE_UIHILIGHTGLOW, opacity=0.5, align=uiconst.CENTER, blendMode=1, spriteEffect=trinity.TR2_SFX_MODULATE)
     self.rangeMeterRightSide.display = True
     self.rangeMeterFull = Sprite(parent=self, name='rangeMeterFull', pos=(0,
      0,
      rangeSize,
      rangeSize), state=uiconst.UI_PICKCHILDREN, texturePath='res:/UI/Texture/classes/RadialMenu/rangeShadow.png', align=uiconst.CENTER, color=(1.0, 1.0, 1.0, 0.4))
示例#8
0
 def ApplyAttributes(self, attributes):
     Transform.ApplyAttributes(self, attributes)
     self.sprite1 = Sprite(
         parent=self,
         align=uiconst.CENTERLEFT,
         pos=(0, 0, 49, 6),
         texturePath='res:/UI/Texture/classes/Industry/Center/blueDash.png')
     self.sprite2 = Sprite(
         parent=self,
         align=uiconst.CENTERLEFT,
         pos=(0, 0, 49, 6),
         texturePath='res:/UI/Texture/classes/Industry/Center/blueDash.png')
     self.sprite3 = Sprite(
         parent=self,
         align=uiconst.CENTERLEFT,
         pos=(0, 0, 49, 6),
         texturePath='res:/UI/Texture/classes/Industry/Center/blueDash.png')
     uthread.new(self.Animate)
示例#9
0
 def ApplyAttributes(self, attributes):
     Transform.ApplyAttributes(self, attributes)
     self.data = attributes.siteData
     self.sprite = Sprite(
         parent=self,
         texturePath='res:/UI/Texture/classes/SensorSuite/small_tick.png',
         align=uiconst.CENTERTOP,
         width=INDICATOR_WIDTH,
         height=INDICATOR_HEIGHT,
         color=self.data.baseColor.GetRGBA(),
         blendMode=trinity.TR2_SBM_ADDX2,
         opacity=INCLINATION_TICK_BASE_OPACITY)
     self.verticalSprite = Sprite(
         parent=self,
         texturePath='res:/UI/Texture/classes/SensorSuite/big_tick.png',
         align=uiconst.CENTERTOP,
         width=INDICATOR_WIDTH,
         height=INDICATOR_HEIGHT,
         color=self.data.baseColor.GetRGBA(),
         blendMode=trinity.TR2_SBM_ADD,
         opacity=0.5)
     self.isNew = True
 def ApplyAttributes(self, attributes):
     Transform.ApplyAttributes(self, attributes)
     self.connections = {}
     self.slotsByID = {}
     self.ShowBackgroundGrid()