Exemplo n.º 1
0
 def ApplyAttributes(self, attributes):
     uicls.Container.ApplyAttributes(self, attributes)
     self.func = attributes.get('func', self.default_func)
     self.args = attributes.get('args', self.default_args)
     self.isActive = attributes.get('isActive', True)
     self.texturePath = attributes.get('texturePath',
                                       self.default_texturePath)
     self.iconSize = attributes.get('iconSize', self.default_iconSize)
     if self.iconSize < self.default_noBgSize:
         self.isHoverBGUsed = True
     else:
         self.isHoverBGUsed = False
     self.enabled = True
     self.icon = self.ConstructIcon()
     width, height = self.GetAbsoluteSize()
     size = min(width, height)
     bgCont = uicls.Container(name='bgCont',
                              parent=self,
                              align=uiconst.CENTER,
                              state=uiconst.UI_DISABLED,
                              width=size,
                              height=size)
     self.mouseEnterBG = uicls.Sprite(
         name='mouseEnterBG',
         bgParent=bgCont,
         texturePath='res:/UI/Texture/classes/ButtonIcon/mouseEnter.png',
         opacity=0.0)
     self.mouseDownBG = uicls.Sprite(
         name='mouseEnterBG',
         bgParent=bgCont,
         texturePath='res:/UI/Texture/classes/ButtonIcon/mouseDown.png',
         opacity=0.0)
     self.bgContainer = bgCont
     self.SetActive(self.isActive, animate=False)
Exemplo n.º 2
0
 def ApplyAttributes(self, attributes):
     uicls.SE_BaseClassCore.ApplyAttributes(self, attributes)
     par = uicls.Container(parent=self,
                           name='par',
                           align=uiconst.TOALL,
                           state=uiconst.UI_DISABLED)
     dot = uicls.Sprite(
         parent=par,
         name='dot',
         pos=(-1, -1, 66, 66),
         align=uiconst.TOPLEFT,
         state=uiconst.UI_DISABLED,
         texturePath='res:/UI/Texture/classes/InvItem/shapeDot.png',
         spriteEffect=trinity.TR2_SFX_DOT,
         blendMode=trinity.TR2_SBM_ADD)
     icon = uicls.Sprite(parent=par,
                         name='icon',
                         pos=(0, 0, 64, 64),
                         state=uiconst.UI_DISABLED)
     shadow = uicls.Sprite(
         parent=par,
         name='shadow',
         pos=(-13, -6, 90, 90),
         state=uiconst.UI_DISABLED,
         texturePath='res:/UI/Texture/classes/InvItem/shapeShadow.png')
Exemplo n.º 3
0
 def init(self):
     sm.RegisterNotify(self)
     self.sr.sizefactor = None
     self.sr.sizefactorsize = None
     self.sr.marks = None
     self.Reset()
     self.overlays = uicls.Container(name='overlays', parent=self, clipChildren=1, pos=(0, 0, 0, 0))
     self.sr.areas = uicls.Container(name='areas', parent=self, clipChildren=1, pos=(0, 0, 0, 0))
     self.hilite = uicls.Sprite(parent=self.overlays, pos=(0, 0, 16, 16), color=(1.0, 1.0, 1.0, 0.4), name='hilite', state=uiconst.UI_HIDDEN, texturePath='res:/UI/Texture/Shared/circleThin16.png', align=uiconst.RELATIVE)
     self.imhere = uicls.Container(name='imhere', parent=self.overlays, state=uiconst.UI_HIDDEN, align=uiconst.TOPLEFT, width=16, height=16)
     circle = uicls.Sprite(parent=self.imhere, idx=0, pos=(0, 0, 16, 16), color=(1.0, 0.0, 0.0, 1.0), name='imhere_sprite', texturePath='res:/UI/Texture/Shared/circleThin16.png', align=uiconst.RELATIVE)
     self.destination = uicls.Sprite(parent=self.overlays, pos=(0, 0, 16, 16), color=(1.0, 1.0, 0.0, 1.0), state=uiconst.UI_HIDDEN, name='destination', texturePath='res:/UI/Texture/Shared/circleThin16.png', align=uiconst.RELATIVE)
     self.sprite = uicls.Icon(name='mapsprite', parent=self, align=uiconst.TOALL, state=uiconst.UI_DISABLED, color=(1.0, 1.0, 1.0, 0.0))
     self.bgSprite = None
     self.dragging = 0
     self.ditherIn = 1
     self.dragAllowed = 0
     self.dataLayer = None
     self.dataToggle = 0
     self.dataArgs = {}
     self.dataLoaded = None
     self.needsize = None
     self.allowAbstract = 1
     self.fillSize = 0.8
     self.mouseHoverGroups = []
     self.cordsAsPortion = {}
     self.fov = None
     self.tempAngleFov = None
Exemplo n.º 4
0
    def Play(self, data):
        self.PlayIntro(data.get('introVideoPath', None))
        frame = uicls.ScreenFrame5(parent=self, align=uiconst.TOALL)
        uicls.Label(name='headingLabel',
                    parent=frame.mainCont,
                    align=uiconst.CENTERTOP,
                    fontsize=80,
                    text=data.headingText,
                    uppercase=True,
                    bold=True,
                    top=30)
        uicore.animations.BlinkIn(frame.mainCont, sleep=True)
        blue.synchro.SleepWallclock(300)
        img1 = uicls.Sprite(name='img1',
                            parent=frame.mainCont,
                            pos=(10, 130, 380, 285),
                            align=uiconst.TOPLEFT)
        uicore.animations.BlinkIn(img1, duration=0.05, sleep=True)
        img2 = uicls.Sprite(name='img2',
                            parent=frame.mainCont,
                            pos=(0, 130, 380, 285),
                            align=uiconst.CENTERTOP)
        uicore.animations.BlinkIn(img2, duration=0.05, sleep=True)
        img3 = uicls.Sprite(name='img3',
                            parent=frame.mainCont,
                            pos=(10, 130, 380, 285),
                            align=uiconst.TOPRIGHT)
        uicore.animations.BlinkIn(img3, duration=0.05, sleep=True)
        for i, sprite in enumerate((img1, img2, img3)):
            imgPath = sm.GetService('photo').GetStorebanner(
                i + 1, prefs.languageID, sprite)
            if imgPath is None:
                sm.GetService('photo').GetStorebanner(i + 1, 'EN', sprite)

        blue.pyos.synchro.SleepWallclock(TEMPLATE_DURATION)
Exemplo n.º 5
0
 def ApplyAttributes(self, attributes):
     uicls.Container.ApplyAttributes(self, attributes)
     leftCont = uicls.Container(name='leftCont', parent=self, align=uiconst.TOLEFT_PROP, width=SIDE_WIDTH)
     self.friendIcon = uicls.LogoIcon(name='friendIcon', parent=leftCont, align=uiconst.CENTER, width=32, height=32, top=-20, ignoreSize=True)
     rightCont = uicls.Container(name='leftCont', parent=self, align=uiconst.TORIGHT_PROP, width=SIDE_WIDTH)
     self.foeIcon = uicls.LogoIcon(name='foeIcon', parent=rightCont, align=uiconst.CENTER, width=32, height=32, top=20, ignoreSize=True)
     self.topCont = uicls.Container(name='topCont', parent=self, align=uiconst.TOTOP_PROP, height=0.4)
     self.bottomCont = uicls.Container(name='bottomCont', parent=self, align=uiconst.TOBOTTOM_PROP, height=0.4)
     self.centerCont = uicls.Container(name='centerCont', parent=self, bgColor=facwarCommon.COLOR_CENTER_BG, padding=2)
     w, h = self.centerCont.GetAbsoluteSize()
     spWidth = 134 / 16.0 * h
     self.friendBar = uicls.Container(parent=self.centerCont, align=uiconst.TOLEFT_PROP, state=uiconst.UI_NORMAL, bgColor=facwarCommon.COLOR_FRIEND_BAR, clipChildren=True)
     self.friendBarSprite = uicls.Sprite(parent=self.friendBar, state=uiconst.UI_HIDDEN, texturePath='res:/ui/texture/classes/InfluenceBar/influenceBarPositive.png', color=facwarCommon.COLOR_FRIEND_LIGHT, align=uiconst.TOLEFT, width=spWidth)
     self.friendPointer = uicls.Container(name='friendPointer', align=uiconst.TOPLEFT_PROP, parent=self, pos=(0.0, 0.5, 2, 0.2), idx=0)
     uicls.Line(parent=self.friendPointer, align=uiconst.TOLEFT, weight=2, padBottom=2, color=facwarCommon.COLOR_FRIEND_LIGHT)
     self.friendPointerTxt = uicls.EveHeaderLarge(name='friendPointerTxt', parent=self.friendPointer, align=uiconst.CENTERTOP, top=-28)
     uicls.Sprite(name='friendTriangle', parent=self.friendPointer, texturePath='res:/ui/texture/icons/105_32_15.png', color=facwarCommon.COLOR_FRIEND_LIGHT, align=uiconst.CENTERTOP, rotation=pi / 2, width=32, height=32, top=-19)
     self.foeBar = uicls.Container(parent=self.centerCont, align=uiconst.TORIGHT_PROP, state=uiconst.UI_NORMAL, bgColor=facwarCommon.COLOR_FOE_BAR, clipChildren=True)
     self.foeBarSprite = uicls.Sprite(parent=self.foeBar, state=uiconst.UI_HIDDEN, texturePath='res:/ui/texture/classes/InfluenceBar/influenceBarPositive.png', color=facwarCommon.COLOR_FOE_LIGHT, align=uiconst.TORIGHT, width=spWidth)
     self.foePointer = uicls.Container(name='foePointer', align=uiconst.TOPLEFT_PROP, parent=self, pos=(0.0, 0.5, 2, 0.2), idx=0)
     uicls.Line(parent=self.foePointer, align=uiconst.TORIGHT, weight=2, padTop=2, color=facwarCommon.COLOR_FOE_LIGHT)
     self.foePointerTxt = uicls.EveHeaderLarge(name='foePointerTxt', parent=self.foePointer, align=uiconst.CENTERBOTTOM, top=-28)
     uicls.Sprite(name='foeTriangle', parent=self.foePointer, texturePath='res:/ui/texture/icons/105_32_15.png', color=facwarCommon.COLOR_FOE_LIGHT, align=uiconst.CENTERBOTTOM, rotation=-pi / 2, width=32, height=32, top=-19)
     uthread.new(self.FetchValues)
     uthread.new(self.AnimateBars)
Exemplo n.º 6
0
 def Load(self, node):
     listentry.Generic.Load(self, node)
     self.portraitCont.Flush()
     self.utilMenuCont.Flush()
     data = self.data = node
     charID = self.charID = data.charID
     killRight = data.killRight
     self.killRightID = killRight.killRightID
     self.price = killRight.price
     self.restrictedTo = killRight.restrictedTo
     isMine = data.isMine
     self.inWatchlist = sm.GetService('addressbook').IsInWatchlist(charID)
     charName = cfg.eveowners.Get(charID).name
     self.nameText = localization.GetByLabel(
         'UI/Contracts/ContractsWindow/ShowInfoLink',
         showInfoName=charName,
         info=('showinfo', const.typeCharacterAmarr, charID))
     portrait = uicls.Sprite(parent=self.portraitCont,
                             align=uiconst.TOPRIGHT,
                             pos=(0, 2, 64, 64),
                             state=uiconst.UI_PICKCHILDREN)
     sm.GetService('photo').GetPortrait(charID, 64, portrait)
     self.SetRelationship(data)
     self.statusIcon = uicls.Sprite(
         parent=self.portraitCont,
         name='statusIcon',
         pos=(2, 3, 10, 10),
         state=uiconst.UI_NORMAL,
         texturePath='res:/UI/Texture/classes/Chat/Status.png',
         idx=0)
     if not self.inWatchlist:
         self.statusIcon.display = False
     else:
         self.statusIcon.display = False
         online = sm.GetService('onlineStatus').GetOnlineStatus(charID,
                                                                fetch=False)
         self.SetOnline(online)
     uthread.new(self.SetTimeRemaining)
     if self.price is not None:
         self.saleLabel.display = True
         self.availableLabel.display = True
         saleText, availableText = self.GetForSaleText()
         if self.price > 0:
             self.saleLabel.text = saleText
         else:
             self.availableLabel.top = 19
         self.availableLabel.text = availableText
     else:
         self.saleLabel.display = False
         self.availableLabel.display = False
     if isMine:
         self.utilMenuCont.display = True
         utilMenu = uicls.UtilMenu(
             menuAlign=uiconst.TOPRIGHT,
             parent=self.utilMenuCont,
             align=uiconst.CENTERRIGHT,
             GetUtilMenu=self.SellKillRight,
             texturePath='res:/UI/Texture/Icons/73_16_50.png',
             left=2)
Exemplo n.º 7
0
 def ApplyAttributes(self, attributes):
     uicls.Container.ApplyAttributes(self, attributes)
     self.btnData = attributes.btnData
     self.btnNum = attributes.btnNum
     self.width = attributes.width
     self._isDraggable = attributes.get('isDraggable',
                                        self.default_isDraggable)
     self._openNeocomPanel = None
     self.height = self.width
     self.top = self.height * self.btnNum
     self.panel = None
     self.blinkThread = None
     self.realTop = self.top
     self.dragEventCookie = None
     self.disableClick = False
     self.iconSize = self.height - 2 * self.PADVERTICAL
     self.iconTransform = uicls.Transform(name='iconTransform',
                                          parent=self,
                                          align=uiconst.TOALL,
                                          scalingCenter=(0.5, 0.5))
     self.iconLabelCont = None
     self.icon = uicls.Sprite(parent=self.iconTransform,
                              name='icon',
                              state=uiconst.UI_DISABLED,
                              align=uiconst.CENTER,
                              width=self.iconSize,
                              height=self.iconSize)
     self.UpdateIcon()
     PAD = 1
     self.mouseHoverFrame = uicls.Sprite(
         bgParent=self,
         name='mouseHoverFrame',
         texturePath='res:/UI/Texture/classes/Neocom/buttonHover.png',
         state=uiconst.UI_HIDDEN)
     self.blinkSprite = uicls.Sprite(
         bgParent=self,
         name='blinkSprite',
         texturePath='res:/UI/Texture/classes/Neocom/buttonBlink.png',
         state=uiconst.UI_HIDDEN)
     self.mouseDownFrame = uicls.Frame(
         bgParent=self,
         name='mosueDownFrame',
         texturePath='res:/UI/Texture/classes/Neocom/buttonDown.png',
         cornerSize=5,
         state=uiconst.UI_HIDDEN)
     self.activeFrame = uicls.Frame(
         bgParent=self,
         name='hoverFill',
         texturePath='res:/UI/Texture/classes/Neocom/buttonActive.png',
         cornerSize=5,
         state=uiconst.UI_HIDDEN)
     self.CheckIfActive()
     self.dropFrame = uicls.Frame(parent=self,
                                  name='hoverFrame',
                                  color=util.Color.GetGrayRGBA(1.0, 0.5),
                                  state=uiconst.UI_HIDDEN)
     sm.RegisterNotify(self)
Exemplo n.º 8
0
 def ApplyAttributes(self, attributes):
     uicls.Container.ApplyAttributes(self, attributes)
     self.pinned = False
     self.isSelected = False
     self.safetyLevel = attributes.get('safetyLevel')
     self.data = SAFETY_LEVEL_DATA_MAP[self.safetyLevel]
     self.SetHint(localization.GetByLabel(self.data.safetySelectionHint))
     cont = uicls.Container(name='content', parent=self, padding=3)
     self.text = uicls.EveHeaderSmall(name='buttonLabel',
                                      parent=cont,
                                      color=self.data.color.GetRGBA(),
                                      text=localization.GetByLabel(
                                          self.data.buttonText),
                                      align=uiconst.CENTER,
                                      opacity=DESELECTED_BUTTON_OPACITY,
                                      bold=True)
     self.defaultSprite = uicls.Sprite(
         parent=self,
         name='default',
         texturePath='res:/UI/Texture/Crimewatch/SafetyButton_Default.png',
         align=uiconst.TOALL,
         state=uiconst.UI_DISABLED,
         color=self.data.color.GetRGBA(),
         opacity=DESELECTED_BUTTON_OPACITY)
     self.highlightSprite = uicls.Sprite(
         parent=self,
         name='highlight',
         texturePath='res:/UI/Texture/Crimewatch/SafetyButton_Highlight.png',
         align=uiconst.TOALL,
         state=uiconst.UI_DISABLED,
         color=self.data.color.GetRGBA())
     self.highlightSprite.Hide()
     self.leftArrowSprite = uicls.Sprite(
         parent=self,
         name='leftArrows',
         texturePath='res:/UI/Texture/Crimewatch/Safety_Selection.png',
         align=uiconst.CENTERLEFT,
         pos=(-24, 0, 16, 13),
         state=uiconst.UI_DISABLED,
         color=self.data.color.GetRGBA(),
         opacity=0.0)
     self.rightArrows = uicls.Transform(parent=self,
                                        name='rightArrowsTranform',
                                        align=uiconst.CENTERRIGHT,
                                        pos=(-24, 0, 16, 13),
                                        state=uiconst.UI_DISABLED,
                                        rotation=pi)
     self.rightArrowSprite = uicls.Sprite(
         parent=self.rightArrows,
         name='rightArrows',
         texturePath='res:/UI/Texture/Crimewatch/Safety_Selection.png',
         align=uiconst.CENTERRIGHT,
         pos=(0, 0, 16, 13),
         state=uiconst.UI_DISABLED,
         color=self.data.color.GetRGBA(),
         opacity=0.0)
Exemplo n.º 9
0
 def Play(self, data):
     if data is None:
         return
     self.PlayIntro(data.get('introVideoPath', None))
     leftFrame = uicls.ScreenFrame5(parent=self,
                                    align=uiconst.TOLEFT,
                                    width=700)
     uicls.Sprite(
         name='plexLogo',
         parent=leftFrame.mainCont,
         align=uiconst.TOPLEFT,
         pos=(10, 30, 262, 326),
         texturePath='res:/UI/Texture/Classes/CQMainScreen/plexLogo.png')
     uicls.Label(name='heading',
                 parent=leftFrame.mainCont,
                 pos=(310, 20, 380, 0),
                 text=data.headingText,
                 fontsize=70,
                 uppercase=True,
                 bold=True)
     uicls.Label(name='subHeading',
                 parent=leftFrame.mainCont,
                 pos=(310, 85, 380, 0),
                 text=data.subHeadingText,
                 fontsize=35)
     greenCont = uicls.Container(name='trainCont',
                                 parent=leftFrame.mainCont,
                                 align=uiconst.TOPLEFT,
                                 bgColor=(0, 0.3, 0, 1.0),
                                 pos=(310, 143, 370, 50))
     uicls.Label(parent=greenCont,
                 text=data.buttonText,
                 fontsize=20,
                 align=uiconst.CENTER,
                 bold=True)
     uicls.Label(parent=leftFrame.mainCont,
                 pos=(10, 250, 690, 0),
                 text=data.mainText,
                 fontsize=35)
     leftFrame.mainCont.opacity = 0.0
     blue.synchro.SleepWallclock(300)
     uicore.animations.BlinkIn(leftFrame.mainCont, sleep=True)
     rightFrame = uicls.ScreenFrame1(parent=self,
                                     align=uiconst.TORIGHT,
                                     width=540)
     blue.synchro.SleepWallclock(300)
     self.auraSprite = uicls.Sprite(
         name='aura',
         parent=rightFrame.mainCont,
         texturePath='res:/UI/Texture/Classes/CQMainScreen/aura.png',
         align=uiconst.CENTER,
         width=470,
         height=470)
     uthread.new(BlinkSprite, self.auraSprite)
     blue.pyos.synchro.SleepWallclock(TEMPLATE_DURATION)
Exemplo n.º 10
0
    def SetIncrements(self, increments):
        self._incrementsParent.Flush()
        maxMarkerSize = 0
        labels = []
        self._increments = []
        if increments:
            last = increments.pop(-1)
            stepSize = 1.0 / len(increments)
            c = uicls.GridContainer(parent=self._incrementsParent, lines=1, columns=len(increments))
            i = 0
            for incrementData in increments:
                label = incrementData[0]
                markerSize = incrementData[1]
                inc = uicls.Container(parent=c, align=uiconst.TOALL)
                if markerSize:
                    maxMarkerSize = max(maxMarkerSize, markerSize)
                    uicls.Line(parent=inc, align=uiconst.TOPLEFT, width=1, height=markerSize)
                    self._increments.append((i * stepSize, incrementData))
                if label:
                    if label.startswith('res:'):
                        s = uicls.Sprite(parent=inc, texturePath=label, width=16, height=16, align=uiconst.CENTER, idx=0, top=-2, color=(1, 1, 1, 0.7))
                        labels.append(s)
                    else:
                        l = uicls.EveLabelSmall(parent=inc, text=label, left=-MAINSIDEMARGIN)
                        if i == 0:
                            l.left = max(-MAINSIDEMARGIN, -l.textwidth / 2)
                        else:
                            l.left = -l.textwidth / 2
                        labels.append(l)
                i += 1

            label = last[0]
            markerSize = last[1]
            inc = uicls.Container(parent=self._incrementsParent, align=uiconst.TORIGHT, width=1, idx=0)
            if markerSize:
                maxMarkerSize = max(maxMarkerSize, markerSize)
                uicls.Line(parent=inc, align=uiconst.TOPLEFT, width=1, height=markerSize)
                self._increments.append((i * stepSize, last))
            if label:
                if label.startswith('res:'):
                    s = uicls.Sprite(parent=inc, texturePath=label, width=16, height=16, align=uiconst.CENTER, idx=0, top=-2, color=(1, 1, 1, 0.7))
                    labels.append(s)
                else:
                    l = uicls.EveLabelSmall(parent=inc, text=label, align=uiconst.TOPRIGHT)
                    l.left = max(-MAINSIDEMARGIN, -l.textwidth / 2)
                    labels.append(l)
        maxHeight = 0
        for l in labels:
            l.top += maxMarkerSize
            maxHeight = max(l.top + l.height, maxHeight)

        self._incrementsParent.height = maxHeight
        self.height = sum([ each.height + each.padTop + each.padBottom for each in self.children if each.align == uiconst.TOTOP ])
Exemplo n.º 11
0
    def SetSystemCaptureStatus(self, captureStatus):
        fwSvc = sm.GetService('facwar')
        self.captureStatus = captureStatus
        self.animCont.Flush()
        size = 32
        if captureStatus == facwarCommon.STATE_STABLE:
            pass
        elif captureStatus == facwarCommon.STATE_CONTESTED:
            ripple = uicls.Sprite(
                parent=self.animCont,
                align=uiconst.CENTER,
                pos=(0, 0, 32, 32),
                texturePath='res:/UI/Texture/classes/FWWindow/ripple1.png',
                color=util.Color.WHITE)
            uicore.animations.FadeTo(ripple,
                                     0.1,
                                     0.5,
                                     duration=3.0,
                                     curveType=uiconst.ANIM_WAVE,
                                     loops=uiconst.ANIM_REPEAT)
        elif captureStatus == facwarCommon.STATE_VULNERABLE:
            for texturePath in (
                    'res:/UI/Texture/classes/FWWindow/ripple1.png',
                    'res:/UI/Texture/classes/FWWindow/ripple2.png',
                    'res:/UI/Texture/classes/FWWindow/ripple3.png'):
                ripple = uicls.Sprite(parent=self.animCont,
                                      align=uiconst.CENTER,
                                      pos=(0, 0, size, size),
                                      texturePath=texturePath,
                                      color=self.color)
                uicore.animations.FadeTo(ripple,
                                         0.1,
                                         0.8,
                                         duration=3.0,
                                         curveType=uiconst.ANIM_WAVE,
                                         loops=uiconst.ANIM_REPEAT)
                blue.synchro.SleepWallclock(1000)

        elif captureStatus == facwarCommon.STATE_CAPTURED:
            wasMine = self.systemID in fwSvc.GetSolarSystemsOccupiedByFactions(
                [fwSvc.GetActiveFactionID()])
            if wasMine:
                fromColor = facwarCommon.COLOR_FRIEND_BAR
                toColor = facwarCommon.COLOR_FOE_BAR
            else:
                fromColor = facwarCommon.COLOR_FOE_BAR
                toColor = facwarCommon.COLOR_FRIEND_BAR
            uicore.animations.SpColorMorphTo(self.dotSprite,
                                             fromColor,
                                             toColor,
                                             duration=2.0,
                                             curveType=uiconst.ANIM_SMOOTH,
                                             loops=uiconst.ANIM_REPEAT)
Exemplo n.º 12
0
 def ApplyAttributes(self, attributes):
     uicls.Container.ApplyAttributes(self, attributes)
     text = attributes.get('text', '')
     self.pointDirections = attributes.get('pointDirections', (0, 0, 0))
     self.arrowPositionModifier = attributes.get('arrowPositionModifier', 0)
     pointUp, pointDown, pointLeft = self.pointDirections
     self.innerCont = uicls.Container(parent=self,
                                      align=uiconst.TOALL,
                                      name='innerCont')
     self.blinkSprite = uicls.Sprite(
         bgParent=self.innerCont,
         name='blinkSprite',
         texturePath='res:/UI/Texture/classes/Neocom/buttonDown.png',
         state=uiconst.UI_DISABLED)
     bgColor = (0.0, 0.0, 0.0, 0.8)
     backgroundFill = uicls.Fill(name='UIPointerImg',
                                 bgParent=self.innerCont,
                                 color=bgColor)
     self.arrowSprite = uicls.Sprite(name='arrow',
                                     parent=self,
                                     align=uiconst.TOPLEFT,
                                     state=uiconst.UI_DISABLED,
                                     color=bgColor)
     maxTextWidth = UIPOINTER_WIDTH - 23
     self.pointerLabel = uicls.EveCaptionSmall(text=text,
                                               parent=self.innerCont,
                                               align=uiconst.CENTER,
                                               width=maxTextWidth,
                                               state=uiconst.UI_DISABLED,
                                               idx=0)
     if self.pointerLabel.textwidth < maxTextWidth:
         self.pointerLabel.left = (maxTextWidth -
                                   self.pointerLabel.textwidth) / 2
     self.headerButtons = uicls.Container(name='headerButtons',
                                          state=uiconst.UI_PICKCHILDREN,
                                          align=uiconst.TOPRIGHT,
                                          parent=self.innerCont,
                                          pos=(5, 0, 15, 15),
                                          idx=0,
                                          display=False)
     uicls.ImageButton(
         name='close',
         parent=self.headerButtons,
         align=uiconst.TOPRIGHT,
         state=uiconst.UI_NORMAL,
         pos=(0, 0, 16, 16),
         idleIcon='ui_38_16_220',
         mouseoverIcon='ui_38_16_220',
         mousedownIcon='ui_38_16_220',
         onclick=lambda: getattr(self, 'OnClosePointer')(),
         expandonleft=True,
         hint=localization.GetByLabel('UI/Common/Buttons/Close'))
     self.headerButtons.Hide()
Exemplo n.º 13
0
 def ConstructNewFWPlayerHeader(self):
     self.topCont.Flush()
     iconSize = 50
     firstLine = uicls.Container(parent=self.topCont,
                                 align=uiconst.TOTOP_PROP,
                                 height=0.4,
                                 padLeft=20)
     uicls.Sprite(
         parent=firstLine,
         align=uiconst.CENTERLEFT,
         pos=(0, 0, iconSize, iconSize),
         texturePath='res:/UI/Texture/Icons/FactionalWarfare_64.png')
     enemyID = facwarCommon.GetFactionMainEnemy(self.factionID)
     enemyAllyID = facwarCommon.GetFactionSecondaryEnemy(self.factionID)
     text = localization.GetByLabel(
         'UI/FactionWarfare/NonFWPlayerHeader1',
         typeID=const.typeFaction,
         factionID=self.factionID,
         factionName=self.factionName,
         enemyID=enemyID,
         enemyName=cfg.eveowners.Get(enemyID).name,
         enemyAllyID=enemyAllyID,
         enemyAllyName=cfg.eveowners.Get(enemyAllyID).name)
     uicls.EveLabelLarge(parent=firstLine,
                         align=uiconst.CENTERLEFT,
                         state=uiconst.UI_NORMAL,
                         left=iconSize + 20,
                         text=text)
     secondLine = uicls.Container(parent=self.topCont,
                                  align=uiconst.TOTOP_PROP,
                                  height=0.6,
                                  padLeft=20)
     uicls.Sprite(parent=secondLine,
                  align=uiconst.CENTERLEFT,
                  pos=(0, 0, iconSize, iconSize),
                  texturePath='res:/UI/Texture/Icons/34_64_8.png')
     enemyID = facwarCommon.GetFactionMainEnemy(self.factionID)
     labelCont = uicls.ContainerAutoSize(parent=secondLine,
                                         align=uiconst.CENTERLEFT,
                                         left=iconSize + 20)
     uicls.EveCaptionSmall(parent=labelCont,
                           text=localization.GetByLabel(
                               'UI/FactionWarfare/FightForFaction',
                               factionName=cfg.eveowners.Get(
                                   self.factionID).name))
     uicls.EveLabelMedium(
         state=uiconst.UI_NORMAL,
         parent=labelCont,
         top=25,
         text=localization.GetByLabel(
             'UI/FactionWarfare/FightForFactionText',
             url='localsvc:service=facwar&method=ShowRulesOfEngagementTab'))
Exemplo n.º 14
0
 def ApplyAttributes(self, attributes):
     uicls.Container.ApplyAttributes(self, attributes)
     overlay = uicls.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 = uicls.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 = uicls.Sprite(
         parent=self,
         name='baseColor',
         align=uiconst.TOALL,
         state=uiconst.UI_DISABLED,
         texturePath=
         'res:/UI/Texture/classes/Fitting/fittingbase_basecircle.png')
     self.sr.baseShape = uicls.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))
Exemplo n.º 15
0
 def ApplyAttributes(self, attributes):
     uicls.Container.ApplyAttributes(self, attributes)
     size = 24
     self.ramps = uicls.Container(parent=self,
                                  name='ramps',
                                  pos=(0, 0, size, size),
                                  align=uiconst.TOPLEFT,
                                  state=uiconst.UI_DISABLED)
     leftRampCont = uicls.Container(parent=self.ramps,
                                    name='leftRampCont',
                                    pos=(0, 0, size / 2, size),
                                    align=uiconst.TOPLEFT,
                                    state=uiconst.UI_DISABLED,
                                    clipChildren=True)
     self.leftRamp = uicls.Transform(parent=leftRampCont,
                                     name='leftRamp',
                                     pos=(0, 0, size, size),
                                     align=uiconst.TOPLEFT,
                                     state=uiconst.UI_DISABLED)
     uicls.Sprite(
         parent=self.leftRamp,
         name='rampSprite',
         pos=(0, 0, size / 2, size),
         state=uiconst.UI_DISABLED,
         texturePath='res:/UI/Texture/classes/TiDiIndicator/left.png',
         color=(0, 0, 0, 0.5))
     rightRampCont = uicls.Container(parent=self.ramps,
                                     name='rightRampCont',
                                     pos=(0, 0, size / 2, size),
                                     align=uiconst.TOPRIGHT,
                                     state=uiconst.UI_DISABLED,
                                     clipChildren=True)
     self.rightRamp = uicls.Transform(parent=rightRampCont,
                                      name='rightRamp',
                                      pos=(-size / 2, 0, size, size),
                                      align=uiconst.TOPLEFT,
                                      state=uiconst.UI_DISABLED)
     uicls.Sprite(
         parent=self.rightRamp,
         name='rampSprite',
         pos=(size / 2, 0, size / 2, size),
         state=uiconst.UI_DISABLED,
         texturePath='res:/UI/Texture/classes/TiDiIndicator/right.png',
         color=(0, 0, 0, 0.5))
     self.coloredPie = uicls.Sprite(
         parent=self,
         name='tidiColoredPie',
         pos=(0, 0, size, size),
         texturePath='res:/UI/Texture/classes/TiDiIndicator/circle.png',
         state=uiconst.UI_DISABLED,
         color=(1, 1, 1, 0.5))
Exemplo n.º 16
0
 def ApplyAttributes(self, attributes):
     uicls.Bracket.ApplyAttributes(self, attributes)
     self.captureStatus = attributes.get('captureStatus',
                                         facwarCommon.STATE_STABLE)
     self.isCurrLocation = attributes.get('isCurrLocation', False)
     self.controller = attributes.controller
     self.systemID = attributes.systemID
     self.occupierID = attributes.occupierID
     self.friendID = attributes.friendID
     self.foeID = attributes.foeID
     if self.occupierID == self.friendID:
         self.color = facwarCommon.COLOR_FRIEND_BAR
         self.hoverColor = facwarCommon.COLOR_FRIEND_LIGHT
     else:
         self.color = facwarCommon.COLOR_FOE_BAR
         self.hoverColor = facwarCommon.COLOR_FOE_LIGHT
     self.dotSprite = uicls.Sprite(
         parent=self,
         texturePath='res:/Texture/Particle/MapSprite.dds',
         align=uiconst.TOALL,
         state=uiconst.UI_DISABLED,
         color=self.color)
     self.bgSprite = uicls.Sprite(
         parent=self,
         texturePath='res:/Texture/Particle/MapSprite.dds',
         align=uiconst.TOALL,
         state=uiconst.UI_DISABLED,
         color=self.hoverColor,
         padding=-10,
         opacity=0.0)
     if self.systemID == session.solarsystemid2:
         frame = uicls.Sprite(
             parent=self,
             name='frame',
             pos=(0, 0, 20, 20),
             align=uiconst.CENTER,
             state=uiconst.UI_DISABLED,
             opacity=0.3,
             texturePath=
             'res:/UI/Texture/classes/StarMapSvc/currentLocation.png')
         uicls.Label(
             parent=self,
             align=uiconst.CENTERLEFT,
             left=18,
             fontsize=10,
             text=localization.GetByLabel('UI/FactionWarfare/YouAreHere'),
             opacity=0.5)
     self.animCont = uicls.Container(parent=self, state=uiconst.UI_DISABLED)
     uthread.new(self.SetSystemCaptureStatus, self.captureStatus)
Exemplo n.º 17
0
 def ApplyAttributes(self, attributes):
     uicls.Container.ApplyAttributes(self, attributes)
     textList = attributes.get('textList', self.default_textList)
     self.scrollSpeed = attributes.get('scrollSpeed', self.default_scrollSpeed)
     self.fontSize = attributes.get('fontSize', self.default_fontSize)
     fadeColor = attributes.get('fadeColor', self.default_fadeColor)
     fadeWidth = attributes.get('fadeWidth', self.default_fadeWidth)
     self.color = attributes.get('color', self.default_color)
     self.scrollThread = None
     if fadeColor:
         uicls.Sprite(name='leftFade', parent=self, texturePath='res:/UI/Texture/classes/CQMainScreen/autoTextGradientLeft.png', color=fadeColor, align=uiconst.TOLEFT, width=fadeWidth, state=uiconst.UI_DISABLED)
         uicls.Sprite(name='leftFade', parent=self, texturePath='res:/UI/Texture/classes/CQMainScreen/autoTextGradientRight.png', color=fadeColor, align=uiconst.TORIGHT, width=fadeWidth, state=uiconst.UI_DISABLED)
     self.textCont = uicls.Container(name='textCont', parent=self, align=uiconst.CENTERLEFT, height=self.fontSize)
     if textList:
         self.SetTextList(textList)
Exemplo n.º 18
0
    def SetTextList(self, textList, funcList = None, funcKeywordsList = None):
        self.textCont.Flush()
        if self.scrollThread:
            self.scrollThread.kill()
        if not textList:
            return
        x = 0
        for i, text in enumerate(textList):
            if i != 0:
                bullet = uicls.Sprite(parent=self.textCont, align=uiconst.CENTERLEFT, texturePath='res:/UI/texture/classes/CQMainScreen/bullet.png', pos=(x,
                 0,
                 11,
                 11), color=self.color)
                bulletWidth = bullet.width + 10
            else:
                bulletWidth = 0
            if funcList:
                clickFunc = funcList[i]
            else:
                clickFunc = None
            if funcKeywordsList:
                funcKeywords = funcKeywordsList[i]
            else:
                funcKeywords = None
            labelCont = uicls._AutoTextLabelCont(parent=self.textCont, clickFunc=clickFunc, funcKeywords=funcKeywords, left=x + bulletWidth, align=uiconst.TOPLEFT)
            label = uicls.Label(parent=labelCont, text='<b>%s' % text, fontsize=self.fontSize, color=self.color)
            labelCont.width = label.width
            labelCont.height = label.height
            x += label.width + 10 + bulletWidth

        self.textCont.width = x
        self.textCont.height = label.height
        self.scrollThread = uthread.new(self.ScrollThread)
Exemplo n.º 19
0
 def ApplyAttributes(self, attributes):
     uicls.Container.ApplyAttributes(self, attributes)
     text = attributes.get('text', self.default_text)
     appear = attributes.get('appear', False)
     self.hasBargraph = attributes.get('hasBargraph', self.default_hasBargraph)
     rightCont = uicls.Container(name='rightCont', parent=self, align=uiconst.TORIGHT, width=446, padBottom=5)
     uicls.Sprite(name='rightGraphics', parent=rightCont, align=uiconst.TOBOTTOM, texturePath='res:/UI/Texture/classes/CQMainScreen/heading2.png', height=14)
     uicls.Fill(name='thickLine', parent=self, align=uiconst.TOBOTTOM, height=6, padBottom=9, color=util.Color.WHITE)
     self.label = uicls.Label(parent=self, text=text, top=10, fontsize=30, color=util.Color.WHITE)
     self.movingFill = uicls.Fill(name='movingFill', parent=self, align=uiconst.BOTTOMRIGHT, pos=(0, 0, 100, 3), color=util.Color.WHITE)
     if self.hasBargraph:
         barGraphCont = uicls.Container(name='bargraphCont', parent=self, align=uiconst.TOPRIGHT, pos=(10, 8, 332, 31))
         self.barGraph = uicls.Sprite(name='barGraph', parent=barGraphCont, texturePath='res:/UI/Texture/classes/CQMainScreen/barGraph.png', align=uiconst.CENTER, width=barGraphCont.width, height=31)
         self.barGraph.color.a = 0.6
     if appear:
         uthread.new(self.AnimAppear)
Exemplo n.º 20
0
 def LoadAttrs(self, attrs):
     src = attrs.src
     if attrs.texture:
         sprite = uicls.Sprite(parent=self,
                               align=uiconst.TOALL,
                               state=uiconst.UI_DISABLED)
         sprite.texture = attrs.texture
     elif src.startswith('icon:'):
         uthread.new(self.LoadIcon)
     parts = src.split(':', 1)
     if len(parts) == 2:
         imageType, imageData = parts
         if imageType == 'portrait':
             uthread.new(self.LoadPortrait)
         elif imageType in self.LOGO_IMAGE_TYPES:
             logo = uiutil.GetLogoIcon(itemID=int(imageData),
                                       align=uiconst.TOALL,
                                       parent=self,
                                       state=uiconst.UI_DISABLED)
         elif src.startswith('starmap:'):
             uthread.new(self.GetMap, src)
         elif src.startswith('typeicon:'):
             uthread.new(self.LoadTypeIcon)
         elif imageType == 'reward':
             uthread.new(self.LoadReward,
                         int(imageData)).context = 'Image::LoadReward'
Exemplo n.º 21
0
 def ApplyAttributes(self, attributes):
     uicls.Transform.ApplyAttributes(self, attributes)
     sprite = uicls.Sprite(parent=self, texturePath='res:/UI/Texture/loadingWheel.dds', pos=(0, 0, 0, 0), align=uiconst.TOALL, state=uiconst.UI_DISABLED)
     loopParams = attributes.get('loopParams', self.default_loopParams)
     if loopParams:
         direction, time = loopParams
         uthread.new(self.StartRotationCycle, direction, time)
Exemplo n.º 22
0
 def Prepare_Appearance_(self):
     uicls.Line(parent=self.sr.buttonParent,
                align=uiconst.TOLEFT,
                color=(0.0, 0.0, 0.0, 0.1))
     uicls.Line(parent=self.sr.buttonParent,
                align=uiconst.TORIGHT,
                color=(0.0, 0.0, 0.0, 0.1))
     shape = uicls.Container(parent=self,
                             name='shape',
                             state=uiconst.UI_DISABLED,
                             align=uiconst.TOALL,
                             padding=(3, 3, 3, 3))
     uicls.Frame(parent=shape,
                 name='dot',
                 texturePath='res:/UI/Texture/Shared/windowButtonDOT.png',
                 cornerSize=2,
                 spriteEffect=trinity.TR2_SFX_DOT,
                 blendMode=trinity.TR2_SBM_ADD)
     uicls.Sprite(
         parent=shape,
         name='gradientFill',
         texturePath='res:/UI/Texture/Shared/windowButtonGradient.png',
         align=uiconst.TOALL,
         filter=False,
         color=(1, 1, 1, 0.8))
     uicls.Fill(name='solidFill', parent=shape, color=(0, 0, 0, 0.95))
     uicls.Frame(parent=shape,
                 padding=(-4, -4, -4, -4),
                 name='shadow',
                 texturePath='res:/UI/Texture/Shared/windowShadow.png',
                 cornerSize=9,
                 state=uiconst.UI_DISABLED,
                 color=(0.0, 0.0, 0.0, 0.5))
Exemplo n.º 23
0
    def GetUnderlay(self):
        if self.underlay is None:
            for each in uicore.layer.main.children[:]:
                if each is not None and not each.destroyed and each.name == 'services':
                    uicore.registry.UnregisterWindow(each)
                    each.OnClick = None
                    each.Minimize = None
                    each.Maximize = None
                    each.Close()

            self.underlay = uicls.Sprite(name='services', parent=uicore.layer.main, align=uiconst.TOTOP, state=uiconst.UI_HIDDEN)
            self.underlay.scope = 'station'
            self.underlay.minimized = 0
            self.underlay.Minimize = self.MinimizeUnderlay
            self.underlay.Maximize = self.MaximizeUnderlay
            main = uicls.Container(name='mainparentXX', parent=self.underlay, align=uiconst.TOALL, pos=(0, 0, 0, 0))
            main.OnClick = self.ClickParent
            main.state = uiconst.UI_NORMAL
            sub = uicls.Container(name='subparent', parent=main, align=uiconst.TOALL, pos=(0, 0, 0, 0))
            captionparent = uicls.Container(name='captionparent', parent=main, align=uiconst.TOPLEFT, left=128, top=36, idx=0)
            caption = uicls.CaptionLabel(text='', parent=captionparent)
            self.closeBtn = uicls.ButtonGroup(btns=[[localization.GetByLabel('UI/Commands/CmdClose'),
              self.CloseSvc,
              None,
              81]], parent=sub)
            self.sr.underlay = uicls.WindowUnderlay(parent=main)
            self.sr.underlay.padding = (-1, -10, -1, 0)
            svcparent = uicls.Container(name='serviceparent', parent=sub, align=uiconst.TOALL, pos=(0, 0, 0, 0))
            self.underlay.sr.main = main
            self.underlay.sr.svcparent = svcparent
            self.underlay.sr.caption = caption
            uicore.registry.RegisterWindow(self.underlay)
        return self.underlay
Exemplo n.º 24
0
 def ApplyAttributes(self, attributes):
     uicls.SE_BaseClassCore.ApplyAttributes(self, attributes)
     self.copyicon = uicls.Icon(icon='ui_73_16_1', parent=self, pos=(3, 3, 16, 16), align=uiconst.TOPRIGHT, hint=localization.GetByLabel('UI/Control/Entries/CopyKillInfo'))
     self.copyicon.OnClick = self.GetCombatText
     iconCont = uicls.Container(parent=self, align=uiconst.TOLEFT, width=40)
     self.shipCont = uicls.Container(parent=iconCont, align=uiconst.CENTER, width=32, height=32)
     self.shipFrame = uicls.Frame(parent=self.shipCont)
     self.shipIcon = uicls.Icon(parent=self.shipCont, align=uiconst.TOALL, size=256, ignoreSize=True)
     self.shipIcon.cursor = uiconst.UICURSOR_MAGNIFIER
     self.shipIcon.OnClick = (self.OnPreviewClick, self.shipIcon)
     self.shipIcon.OnMouseEnter = self.OnControlEnter
     self.shipIcon.OnMouseExit = self.OnControlExit
     self.techIcon = uicls.Sprite(name='techIcon', parent=self.shipCont, align=uiconst.RELATIVE, width=16, height=16, idx=0, left=1, top=1)
     self.techIcon.OnMouseEnter = self.OnControlEnter
     self.techIcon.OnMouseExit = self.OnControlExit
     self.timeCont = uicls.Container(parent=self, align=uiconst.TORIGHT, width=35, padRight=6)
     self.textCont = uicls.Container(parent=self, align=uiconst.TOALL, state=uiconst.UI_PICKCHILDREN, clipChildren=True)
     self.victimLabel = uicls.EveLabelMedium(text='', parent=self.textCont, left=5, top=3, state=uiconst.UI_NORMAL, maxLines=1)
     self.killerLabel = uicls.EveLabelMedium(text='', parent=self.textCont, left=5, top=20, state=uiconst.UI_NORMAL, maxLines=1)
     self.dateLabel = uicls.EveLabelMedium(text='', parent=self.timeCont, align=uiconst.TOPRIGHT, top=20)
     self.victimLabel.OnMouseEnter = self.OnControlEnter
     self.victimLabel.OnMouseExit = self.OnControlExit
     self.killerLabel.OnMouseEnter = self.OnControlEnter
     self.killerLabel.OnMouseExit = self.OnControlExit
     self.hilite = uicls.Fill(bgParent=self, color=(1.0, 1.0, 1.0, 0.1), idx=0)
     self.hilite.display = False
Exemplo n.º 25
0
 def ApplyAttributes(self, attributes):
     uicls.Container.ApplyAttributes(self, attributes)
     corpID = attributes.corpID
     self.entityID = attributes.entityID
     self.cursor = uiconst.UICURSOR_SELECT
     self.hoverFill = uicls.Fill(parent=self,
                                 name='hoverFill',
                                 padding=-50,
                                 color=(1.0, 1.0, 1.0, 0.0))
     self.frame = uicls.ScreenFrame5(parent=self,
                                     align=uiconst.TOALL,
                                     padding=10)
     self.ConstructCorpLogo(corpID)
     self.hoverLabel = uicls.Label(
         name='hoverLabel',
         parent=self,
         text=localization.GetByLabel('UI/Station/Holoscreen/Corporation'),
         align=uiconst.CENTERBOTTOM,
         top=60,
         uppercase=True,
         fontsize=35,
         state=uiconst.UI_DISABLED,
         color=util.Color.WHITE)
     self.hoverLabel.opacity = 0.0
     self.bgSprite = uicls.Sprite(
         parent=self,
         texturePath=
         'res:/UI/Texture/Classes/CQSideScreens/corpRecruitmentScreenBG.png',
         align=uiconst.TOALL,
         state=uiconst.UI_DISABLED,
         padding=-50)
     uthread.new(self.AnimBackground)
Exemplo n.º 26
0
 def GetSprite(self):
     if self.sr.sprite is None:
         self.sr.sprite = uicls.Sprite(parent=self, state=uiconst.UI_PICKCHILDREN, filter=False, name='textSprite', idx=0)
         self.sr.sprite.OnCreate = self.OnCreate
         trinity.device.RegisterResource(self.sr.sprite)
         uicore.textObjects.add(self)
     return self.sr.sprite
Exemplo n.º 27
0
 def LoadData(self, data=None, layerid=0):
     if data is None:
         return
     self.data = data
     for lid, (type, mapping, color) in enumerate(data):
         if len(data) == 1:
             lid = layerid
         par = self.GetLayer(lid)
         if not par:
             par = uicls.Container(parent=self,
                                   align=uiconst.TOALL,
                                   pos=(0, 0, 0, 0),
                                   clipChildren=0,
                                   state=uiconst.UI_HIDDEN)
             par.name = '%sLayer%s' % (self.lname, lid)
         spr = self.GetSprite(lid)
         if not spr:
             sprite = uicls.Sprite(parent=par,
                                   align=uiconst.TOALL,
                                   left=0,
                                   lockAspect=1,
                                   state=uiconst.UI_DISABLED)
             sprite.name = '%sSprite%s' % (self.lname, lid)
         if mapping != None:
             self.SetSprite(lid, type, mapping)
         if color is not None and color != -1:
             self.SetSpriteColor(lid, color)
Exemplo n.º 28
0
 def ConstructLayout(self):
     self.topFill = uicls.Container(parent=self, name='topFill', bgColor=settings.char.windows.Get('wndColor', eve.themeColor), align=uiconst.TOTOP, height=30)
     self.topBG = uicls.Sprite(parent=self.topFill, align=uiconst.TOALL, texturePath='res:/UI/Texture/classes/Neocom/eveButtonBg.png', blendMode=trinity.TR2_SBM_ADD)
     self.main = uicls.Container(name='main', parent=self, padTop=3)
     color = self.GetBackgroundColor()
     self.bgFill = uicls.Fill(parent=self, color=color, align=uiconst.TOTOP)
     uicls.GradientSprite(parent=self, align=uiconst.TOALL, rgbData=[(0.0, color[:3])], alphaData=[(0.0, color[3]), (0.4, 0.3), (1.0, 0.1)], rotation=-pi / 2)
Exemplo n.º 29
0
 def OnPIScreenDesktopCreated(self, desktop, entityID):
     self.piScreenDesktop = desktop
     if prefs.GetValue('cqScreensEnabled', True):
         self.piScreen = cqscreen.PIScreen(parent=desktop, entityID=entityID)
     else:
         self.piScreen = uicls.Sprite(name='screenRightFallback', parent=desktop, texturePath='res:/UI/Texture/classes/CQSideScreens/PIScreenBG.png', align=uiconst.TOALL)
         self.piScreen.entityID = entityID
Exemplo n.º 30
0
 def ConstructMainCont(self):
     self.spriteCont.Flush()
     self.mainItem = None
     self.mainTransform = None
     self.mainSprite = None
     self.codeEdit = None
     if self.mode is MODE_NORMAL:
         self.mainTransform = uicls.Transform(parent=self.spriteCont,
                                              align=uiconst.CENTER,
                                              pos=(0, 0, 128, 128))
         self.mainSprite = uicls.Sprite(
             parent=self.mainTransform,
             align=uiconst.CENTER,
             pos=(0, 0, 128, 128),
             texturePath='res:/UI/Texture/CorpLogoLibs/419.png',
             texturePathSecondary='res:/UI/Texture/colorgradient.dds')
     elif self.mode is MODE_CODE:
         self.codeEdit = uicls.SinglelineEdit(
             parent=self.spriteCont,
             align=uiconst.TOTOP,
             label='Code that returns a UI object:',
             heigt=15,
             padding=(10, 30, 150, 0),
             setvalue=settings.user.ui.Get('TestAnimationsWndCode',
                                           'uicore.layer.sidePanels'))
         uicls.Button(parent=self.spriteCont,
                      align=uiconst.TOPLEFT,
                      label='Assign result',
                      top=60,
                      left=5,
                      func=self.OnAssignCodeBtn)
     elif self.mode is MODE_INPUT:
         self.mainItem = self.inputObj