コード例 #1
0
 def Play(self, data):
     if data is None:
         return
     self.PlayIntro(data.get('introVideoPath', None))
     self.leftCont = uiprimitives.Container(parent=self,
                                            align=uiconst.TOLEFT,
                                            width=640,
                                            padRight=10)
     self.rightCont = uicls.ScreenFrame5(parent=self, align=uiconst.TOALL)
     headingCont = uiprimitives.Container(parent=self.leftCont,
                                          align=uiconst.TOTOP,
                                          height=100,
                                          bgColor=(0.35, 0.35, 0.35, 1.0))
     uicontrols.Label(parent=headingCont,
                      text=data.headingText,
                      fontsize=80,
                      align=uiconst.CENTER,
                      color=util.Color.WHITE,
                      uppercase=True,
                      bold=True)
     blue.pyos.synchro.SleepWallclock(300)
     uicls.ScreenHeading2(parent=self.leftCont,
                          appear=True,
                          align=uiconst.TOTOP,
                          text=data.subHeadingText)
     frame = uicls.ScreenFrame4(parent=self.leftCont,
                                align=uiconst.TOALL,
                                appear=True,
                                padTop=10)
     frame.mainCont.padLeft = 30
     frame.mainCont.padTop = 20
     uicontrols.Label(name='charNameLabel',
                      parent=frame.mainCont,
                      text=cfg.eveowners.Get(data.charID).name,
                      fontsize=35,
                      left=290)
     pictureCont = uiprimitives.Container(align=uiconst.TOPLEFT,
                                          parent=frame.mainCont,
                                          pos=(0, 8, 256, 256))
     uicontrols.Frame(parent=pictureCont, color=util.Color.WHITE)
     uiutil.GetOwnerLogo(pictureCont, data.charID, size=256)
     uicontrols.EveLabelMedium(name='mainTextLabel',
                               parent=frame.mainCont,
                               pos=(290, 45, 300, 0),
                               text=data.mainText)
     video = uiprimitives.VideoSprite(parent=self.rightCont.mainCont,
                                      videoPath=data.careerVideoPath,
                                      align=uiconst.TOALL,
                                      repeat=True,
                                      positionComponent=getattr(
                                          self.uiDesktop,
                                          'positionComponent', None))
     while not video.isFinished:
         blue.synchro.Yield()
コード例 #2
0
 def Populate(self, path = None):
     """
         Fills in the movie container when we want to load a certain movie. Stops the 
         old one, loads the new one and plays.
     """
     self.sr.movieCont.Flush()
     uicontrols.Frame(parent=self.sr.movieCont, color=(1.0, 1.0, 1.0, 0.2), idx=0)
     dimWidth, dimHeight = self.GetSize(self.movieWidth, self.movieHeight)
     if path is not None:
         moviePath = path
     elif self.node is not None:
         moviePath = str(self.node.resPath)
     self.path = moviePath
     self.movie = uiprimitives.VideoSprite(parent=self.sr.movieCont, width=dimWidth, height=dimHeight, align=uiconst.CENTER, state=uiconst.UI_DISABLED, videoPath=moviePath)
コード例 #3
0
 def InitMovie(self):
     self.sr.movieCont = uiprimitives.Container(parent=self,
                                                name='movieCont',
                                                idx=0,
                                                align=uiconst.TOALL,
                                                state=uiconst.UI_DISABLED)
     moviePath = 'res:/video/origins_intro.bik'
     x, y, contWidth, contHeight = self.sr.movieCont.GetAbsolute()
     dimWidth, dimHeight = self.GetVideoDimensions(contWidth, contHeight,
                                                   1280, 720)
     self.movie = uiprimitives.VideoSprite(parent=self.sr.movieCont,
                                           pos=(0, 0, dimWidth, dimHeight),
                                           align=uiconst.CENTER,
                                           videoPath=moviePath,
                                           videoAutoPlay=False)
コード例 #4
0
 def Play(self, data):
     if data is None:
         return
     self.PlayIntro(data.get('introVideoPath', None))
     frame = uicls.ScreenFrame4(parent=self, align=uiconst.TOALL)
     blue.pyos.synchro.SleepWallclock(300)
     video = uiprimitives.VideoSprite(parent=frame.mainCont,
                                      videoPath=data.videoPath,
                                      align=uiconst.TOALL,
                                      positionComponent=getattr(
                                          self.uiDesktop,
                                          'positionComponent', None))
     uicore.animations.BlinkIn(frame.mainCont, loops=4)
     while not video.isFinished:
         blue.synchro.Yield()
コード例 #5
0
    def PlayIntro(self, videoPath):
        if not videoPath:
            return
        video = uiprimitives.VideoSprite(parent=self,
                                         videoPath=videoPath,
                                         align=uiconst.TOALL,
                                         padding=(-128, -132, -128, -132),
                                         positionComponent=getattr(
                                             self.uiDesktop,
                                             'positionComponent', None))
        while not video.isFinished:
            blue.synchro.Yield()

        video.Close()
        uicore.animations.FadeIn(self, duration=0.3)
コード例 #6
0
 def ApplyAttributes(self, attributes):
     uicontrols.Window.ApplyAttributes(self, attributes)
     sm.RegisterNotify(self)
     self.tilesByTileCoord = {}
     self.linesByTileCoords = {}
     self.utilityElements = []
     self.accessibleTiles = []
     self.hasGameEnded = False
     self.bottomCont = uiprimitives.Container(name='bottomCont',
                                              parent=self.sr.main,
                                              align=uiconst.TOBOTTOM,
                                              height=110)
     self.tileHintLabel = uicontrols.Label(name='tileHintLabel',
                                           parent=self.bottomCont,
                                           align=uiconst.BOTTOMRIGHT,
                                           pos=(15, 15, 220, 0),
                                           fontsize=10)
     self.utilityElementContainer = uicontrols.ContainerAutoSize(
         name='utilityElementContainer',
         parent=self.bottomCont,
         align=uiconst.CENTERBOTTOM,
         state=uiconst.UI_PICKCHILDREN,
         opacity=1.0,
         height=50,
         top=10)
     self.virusInfo = hackingUI.VirusInfo(parent=self.bottomCont,
                                          left=15,
                                          top=10,
                                          opacity=0.0)
     self.boardTransform = uiprimitives.Transform(name='boardTransform',
                                                  parent=self.sr.main,
                                                  align=uiconst.TOALL,
                                                  state=uiconst.UI_NORMAL,
                                                  scalingCenter=(0.5, 0.5))
     self.boardContainer = uiprimitives.Container(
         name='boardContainer',
         parent=self.boardTransform,
         align=uiconst.TOPLEFT,
         opacity=0.0)
     self.backgroundVideo = uiprimitives.VideoSprite(
         bgParent=self.sr.maincontainer,
         videoPath='res:/video/hacking/bgLoop_alpha.bik',
         videoLoop=True,
         spriteEffect=trinity.TR2_SFX_COPY,
         color=hackingUIConst.COLOR_WINDOW_BG,
         opacity=0.0)
     sm.GetService('audio').SendUIEvent('minigame_start')
コード例 #7
0
 def Play(self, data):
     if data is None:
         return
     self.PlayIntro(data.get('introVideoPath', None))
     uicls.TextBanner(parent=self,
                      align=uiconst.TOBOTTOM,
                      height=100,
                      text=data.bottomText)
     rightCont = uicls.ScreenFrame5(parent=self,
                                    align=uiconst.TORIGHT,
                                    width=700,
                                    padLeft=10,
                                    padBottom=10)
     blue.pyos.synchro.SleepWallclock(300)
     topLeftCont = uicls.ScreenFrame2(parent=self,
                                      align=uiconst.TOTOP,
                                      height=300)
     bottomLeftCont = uicls.ScreenHeading1(parent=self,
                                           align=uiconst.TOALL,
                                           pos=(0, 0, 0, 0),
                                           padTop=10,
                                           padBottom=10,
                                           leftContWidth=150,
                                           appear=False)
     blue.pyos.synchro.SleepWallclock(300)
     uicls.ScreenHeading2(
         parent=topLeftCont.mainCont,
         text=localization.GetByLabel(
             'UI/Station/Holoscreen/RacialEpicArc/EpicArcAgent'),
         align=uiconst.TOBOTTOM,
         hasBargraph=False,
         padBottom=10,
         padRight=10)
     topLeftCont.mainCont.padLeft = 30
     topLeftCont.mainCont.padTop = 15
     pictureCont = uiprimitives.Container(align=uiconst.TOPLEFT,
                                          parent=topLeftCont.mainCont,
                                          pos=(0, 20, 180, 180))
     uicontrols.Frame(parent=pictureCont, color=util.Color.WHITE)
     uiutil.GetOwnerLogo(pictureCont, data.charID, size=256)
     logo = pictureCont.children[1]
     logo.align = uiconst.TOALL
     logo.width = logo.height = 0
     uicontrols.Label(name='charNameLabel',
                      parent=topLeftCont.mainCont,
                      text=cfg.eveowners.Get(data.charID).name,
                      fontsize=50,
                      left=200,
                      top=20,
                      color=util.Color.WHITE)
     uicontrols.EveLabelMedium(name='charLocationLabel',
                               parent=topLeftCont.mainCont,
                               pos=(200, 75, 300, 0),
                               text=data.mainText)
     uicore.animations.BlinkIn(topLeftCont.mainCont)
     uiutil.GetOwnerLogo(bottomLeftCont.leftCont, data.factionID, size=150)
     icon = bottomLeftCont.leftCont.children[0]
     icon.align = uiconst.CENTER
     uicontrols.Label(parent=bottomLeftCont.mainCont,
                      text=data.factionNameText,
                      fontsize=42,
                      top=30,
                      left=15)
     uicontrols.Label(
         parent=bottomLeftCont.mainCont,
         text=localization.GetByLabel('UI/Agents/MissionTypes/EpicArc'),
         fontsize=30,
         top=80,
         left=15)
     bottomLeftCont.AnimAppear()
     video = uiprimitives.VideoSprite(parent=rightCont.mainCont,
                                      videoPath=data.videoPath,
                                      align=uiconst.TOALL,
                                      positionComponent=getattr(
                                          self.uiDesktop,
                                          'positionComponent', None))
     while not video.isFinished:
         blue.synchro.Yield()
コード例 #8
0
 def Play(self, data):
     if data is None:
         return
     self.PlayIntro(data.get('introVideoPath', None))
     leftCont = uiprimitives.Container(parent=self,
                                       align=uiconst.TOLEFT,
                                       width=845,
                                       padRight=10)
     rightCont = uicls.ScreenFrame5(parent=self, align=uiconst.TOALL)
     headingCont = uiprimitives.Container(parent=leftCont,
                                          align=uiconst.TOTOP,
                                          height=100,
                                          fontsize=50)
     fill = uiprimitives.Fill(bgParent=headingCont,
                              color=(1.0, 0.0, 0.0, 0.5))
     uicore.animations.FadeTo(fill,
                              startVal=0.5,
                              endVal=0.2,
                              duration=1.0,
                              loops=uiconst.ANIM_REPEAT)
     label = uicontrols.Label(parent=headingCont,
                              text=data.headingText,
                              fontsize=80,
                              align=uiconst.CENTER,
                              color=util.Color.WHITE,
                              uppercase=True,
                              bold=True)
     frame = uicls.ScreenFrame1(parent=leftCont,
                                align=uiconst.TOALL,
                                appear=True,
                                padTop=10)
     frame.mainCont.padTop = 70
     banner = uicls.TextBanner(parent=frame.mainCont,
                               align=uiconst.TOBOTTOM,
                               padTop=10,
                               scrollText=False,
                               text=data.bottomText,
                               fontSize=30,
                               leftContWidth=310)
     uiprimitives.Sprite(
         parent=banner.leftCont,
         pos=(10, -20, 300, 100),
         texturePath='res:/UI/Texture/Classes/CQMainScreen/concordLogo.png')
     uicontrols.Label(
         parent=frame.mainCont,
         left=20,
         top=0,
         text=localization.GetByLabel('UI/Common/Constellation'),
         fontsize=30)
     uicontrols.Label(parent=frame.mainCont,
                      left=20,
                      top=30,
                      text=data.constellationText,
                      fontsize=45)
     uicontrols.Label(
         parent=frame.mainCont,
         left=280,
         top=0,
         text=localization.GetByLabel('UI/Incursion/Journal/StagingSystem'),
         fontsize=30)
     uicontrols.Label(parent=frame.mainCont,
                      left=280,
                      top=30,
                      text=data.systemInfoText,
                      fontsize=45)
     uicontrols.Label(parent=frame.mainCont,
                      left=20,
                      top=140,
                      text=localization.GetByLabel(
                          'UI/Incursion/Common/HUDInfluenceTitle'),
                      fontsize=30)
     influenceBar = uicls.SystemInfluenceBar(parent=frame.mainCont,
                                             align=uiconst.TOPLEFT,
                                             pos=(20, 180, 700, 60))
     influenceBar.SetInfluence(data.influence, True)
     uicore.animations.BlinkIn(frame.mainCont, sleep=True)
     video = uiprimitives.VideoSprite(parent=rightCont.mainCont,
                                      videoPath=data.videoPath,
                                      align=uiconst.TOALL,
                                      repeat=True,
                                      positionComponent=getattr(
                                          self.uiDesktop,
                                          'positionComponent', None))
     while not video.isFinished:
         blue.synchro.Yield()