def ApplyAttributes(self, attributes):
     uiprimitives.Container.ApplyAttributes(self, attributes)
     overlay = uiprimitives.Sprite(parent=self, name='overlay', align=uiconst.TOALL, state=uiconst.UI_DISABLED, texturePath='res:/UI/Texture/classes/Fitting/fittingbase_overlay.png', color=(1.0, 1.0, 1.0, 0.39))
     self.sr.calibrationStatusPoly = uicls.Polygon(parent=self, name='calibrationStatusPoly', align=uiconst.CENTER, spriteEffect=trinity.TR2_SFX_FILL, blendMode=trinity.TR2_SBM_ADD)
     self.sr.powergridStatusPoly = uicls.Polygon(parent=self, name='powergridStatusPoly', align=uiconst.CENTER, spriteEffect=trinity.TR2_SFX_FILL, blendMode=trinity.TR2_SBM_ADD)
     self.sr.cpuStatusPoly = uicls.Polygon(parent=self, name='cpuStatusPoly', align=uiconst.CENTER, spriteEffect=trinity.TR2_SFX_FILL, blendMode=trinity.TR2_SBM_ADD)
     baseDOT = uiprimitives.Sprite(parent=self, name='baseDOT', align=uiconst.TOALL, state=uiconst.UI_DISABLED, texturePath='res:/UI/Texture/classes/Fitting/fittingbase_dotproduct.png', spriteEffect=trinity.TR2_SFX_DOT, blendMode=trinity.TR2_SBM_ADD)
     self.sr.baseColor = SpriteUnderlay(parent=self, name='baseColor', align=uiconst.TOALL, state=uiconst.UI_DISABLED, texturePath='res:/UI/Texture/classes/Fitting/fittingbase_basecircle.png', colorType=uiconst.COLORTYPE_UIBASE)
     self.sr.baseShape = uiprimitives.Sprite(parent=self, name='baseShape', align=uiconst.TOALL, state=uiconst.UI_DISABLED, texturePath='res:/UI/Texture/classes/Fitting/fittingbase.png', color=(0.0, 0.0, 0.0, 0.86))
Beispiel #2
0
 def ApplyAttributes(self, attributes):
     uiprimitives.Transform.ApplyAttributes(self, attributes)
     blendMode = attributes.get('blendMode', trinity.TR2_SBM_BLEND)
     self.angle = math.pi
     self.color = (1.0, 1.0, 1.0, 0.5)
     self.polygon = uicls.Polygon(parent=self, align=uiconst.TOALL, blendMode=trinity.TR2_SBM_ADD)
     self.RenderGradient()
Beispiel #3
0
 def setup_layout(self):
     self.headerContainer = uiprimitives.Container(name='headerContainer',
                                                   parent=self,
                                                   align=uiconst.CENTERTOP,
                                                   height=34,
                                                   width=230)
     self.scoreBarContainer = uiprimitives.Container(
         name='scoreBarContainer',
         parent=self,
         align=uiconst.CENTERBOTTOM,
         height=8,
         width=self.headerContainer.width - 10,
         bgColor=(0.62, 0.54, 0.53, 0.26),
         top=10)
     self._initialize_score_bar_length()
     self.scoreBar = uicls.VectorLine(
         name='scoreBar',
         parent=self.scoreBarContainer,
         align=uiconst.CENTERLEFT,
         translationFrom=(0, 0),
         translationTo=(self.calculate_score_bar_length(), 0),
         colorFrom=(1.0, 1.0, 1.0, 0.95),
         colorTo=(1.0, 1.0, 1.0, 0.95),
         widthFrom=3,
         widthTo=3,
         left=3)
     uicls.VectorLine(name='emptyScoreBar',
                      parent=self.scoreBarContainer,
                      align=uiconst.CENTERLEFT,
                      translationFrom=(0, 0),
                      translationTo=(self.scoreBarLength, 0),
                      colorFrom=(0.0, 0.0, 0.0, 0.75),
                      colorTo=(0.0, 0.0, 0.0, 0.75),
                      widthFrom=3,
                      widthTo=3,
                      left=5)
     self.rankInfoContainer = uiprimitives.Container(
         name='rankInfoContainer',
         parent=self.headerContainer,
         align=uiconst.TOLEFT,
         width=75,
         top=3)
     self.rankIcon = uiprimitives.Sprite(
         name='rankIcon',
         parent=self.rankInfoContainer,
         texturePath=self.get_rank_icon_path(),
         height=36,
         width=36,
         align=uiconst.TOLEFT,
         left=5)
     SetTooltipHeaderAndDescription(
         targetObject=self.rankIcon,
         headerText=localization.GetByLabel(
             'UI/ProjectDiscovery/AnalystRankTooltip'),
         descriptionText=localization.GetByLabel(
             'UI/ProjectDiscovery/AnalysisKreditsLabel') + ': ' +
         str(FmtAmt(self.playerState.analysisKredits)))
     self.rankLabel = uicontrols.Label(parent=self.rankInfoContainer,
                                       fontsize=16,
                                       text=self.rank,
                                       align=uiconst.CENTERLEFT,
                                       height=20,
                                       left=40)
     self.accuracyRatingContainer = uiprimitives.Container(
         name='accuracyRatingContainer',
         parent=self.headerContainer,
         align=uiconst.TORIGHT,
         width=75,
         left=5,
         top=3)
     self.accuracyRatingIconContainer = uiprimitives.Container(
         name='accuracyRatingIconContainer',
         parent=self.accuracyRatingContainer,
         height=32,
         width=32,
         align=uiconst.CENTER,
         left=20,
         bgTexturePath=
         'res:/UI/Texture/classes/ProjectDiscovery/accuracyMeterBack.png')
     self.emptySprite = uiprimitives.Sprite(
         name='emptySprite',
         parent=self.accuracyRatingIconContainer,
         width=32,
         height=32,
         align=uiconst.CENTER)
     SetTooltipHeaderAndDescription(
         targetObject=self.emptySprite,
         headerText='',
         descriptionText=localization.GetByLabel(
             'UI/ProjectDiscovery/AccuracyRatingTooltip'))
     self.accuracyNeedleIconContainer = uiprimitives.Transform(
         parent=self.accuracyRatingIconContainer,
         height=32,
         width=32,
         align=uiconst.TORIGHT,
         rotation=0)
     self.accuracyNeedleIcon = uiprimitives.Sprite(
         name='accuracyNeedleIcon',
         parent=self.accuracyNeedleIconContainer,
         texturePath=
         'res:/UI/Texture/classes/ProjectDiscovery/accuracyMeterNeedle.png',
         width=32,
         height=32,
         rotation=2.4,
         align=uiconst.CENTER)
     self.accuracyArcFill = uicls.Polygon(
         parent=self.accuracyRatingIconContainer, align=uiconst.CENTER)
     self.accuracyArcFill.MakeArc(radius=0,
                                  outerRadius=10,
                                  fromDeg=-225.0,
                                  toDeg=-225.0,
                                  outerColor=(1.0, 1.0, 0, 0.7),
                                  innerColor=(1.0, 1.0, 0, 0.7))
     self.accuracyRatingLabel = uicontrols.Label(
         name='AccuracyRating',
         parent=self.accuracyRatingContainer,
         fontsize=16,
         text='00,0%',
         align=uiconst.CENTERLEFT,
         autoFitToText=True,
         height=20)
     self.state = uiconst.UI_NORMAL