예제 #1
0
 def expand_screen(self):
     translationtop = (self.expandTopContainer.translation[0], -210)
     translationbottom = (self.expandBottomContainer.translation[0], -185)
     animations.MoveTo(self.expandTopContainer, startPos=(0, 0), endPos=translationtop, duration=0.2, curveType=uiconst.ANIM_LINEAR)
     animations.MoveTo(self.expandBottomContainer, startPos=(0, 0), endPos=translationbottom, duration=0.2, curveType=uiconst.ANIM_LINEAR)
     animations.MorphScalar(self, 'gradient_height', startVal=48, endVal=440, curveType=uiconst.ANIM_LINEAR, duration=0.2, callback=self.gradient_height_callback)
     sm.GetService('audio').SendUIEvent(const.Sounds.RewardsWindowOpenPlay)
예제 #2
0
 def expand_screen(self):
     self.oldTranslationTop = self.expandTopContainer.translation
     self.oldTranslationBottom = self.expandBottomContainer.translation
     translationtop = (self.expandTopContainer.displayX,
                       -self.images_container.displayHeight / 2.5)
     translationbottom = (self.expandBottomContainer.displayX,
                          -self.images_container.displayHeight / 2.5)
     self.image_frame.SetRGB(0.498, 0.627, 0.74, 0.5)
     animations.MoveTo(self.expandTopContainer,
                       startPos=(0, 0),
                       endPos=translationtop,
                       duration=0.3,
                       curveType=uiconst.ANIM_LINEAR)
     animations.MoveTo(self.expandBottomContainer,
                       startPos=(0, 0),
                       endPos=translationbottom,
                       duration=0.3,
                       curveType=uiconst.ANIM_LINEAR)
     animations.MorphScalar(self,
                            'gradient_height',
                            startVal=48,
                            endVal=self.images_container.displayHeight,
                            curveType=uiconst.ANIM_LINEAR,
                            duration=0.3,
                            callback=self.gradient_height_callback)
     self.audio_service.SendUIEvent(const.Sounds.AnalysisWindowMovePlay)
예제 #3
0
 def move_image_in(self):
     animations.SpShadowAppear(self.image_sprite,
                               duration=1,
                               curveType=uiconst.ANIM_BOUNCE)
     end_pos = (self.parent.parent.parent.parent.displayWidth / 2 -
                self.width / 1.8, 20)
     animations.MoveTo(self.parent,
                       startPos=(0, 20),
                       endPos=end_pos,
                       duration=1)
예제 #4
0
 def move_image_out(self):
     animations.SpShadowDisappear(self.image_sprite,
                                  duration=1,
                                  curveType=uiconst.ANIM_BOUNCE)
     start_pos = (self.parent.parent.parent.parent.displayWidth / 2 -
                  self.width / 1.8, 20)
     animations.MoveTo(self.parent,
                       startPos=start_pos,
                       endPos=(0, 20),
                       duration=1,
                       timeOffset=0.8,
                       callback=self.expand_screen)
예제 #5
0
 def AnimateFrameEnter(self, curveSet, timeOffset=0.0, callback=None):
     moveDist = 40
     for index, (x, y) in enumerate(OUTER_BRACKET_ORIENTATIONS):
         sprite = self.outerSprites[index]
         curveSet = animations.MoveTo(sprite,
                                      startPos=((11 + moveDist) * x,
                                                (11 + moveDist) * y),
                                      endPos=(11 * x, 11 * y),
                                      duration=0.5,
                                      curveSet=curveSet,
                                      timeOffset=timeOffset)
         curveSet = animations.FadeTo(
             sprite,
             duration=0.8,
             curveType=OUTER_BRACKET_OPACITY_CURVE_POINTS,
             curveSet=curveSet,
             timeOffset=timeOffset,
             callback=callback)
예제 #6
0
    def Collapse(self):
        animations.Tr2DRotateTo(self.arrow,
                                endAngle=math.pi / 2.0,
                                duration=0.15)
        reverseSortedEntries = reversed(
            sorted(self._entries, key=self._GetEntrySortKey))
        for i, entry in enumerate(reverseSortedEntries):
            entry.Disable()
            animations.FadeTo(entry,
                              startVal=1.0,
                              endVal=0.0,
                              duration=0.2,
                              timeOffset=i * 0.02)
            animations.MoveTo(
                entry,
                startPos=(0, 0),
                endPos=(0, -(entry.height + entry.padTop + entry.padBottom)),
                duration=0.2,
                timeOffset=i * 0.02 + 0.1)

        sleepDuration = len(self._entries) * 0.02 + 0.3
        blue.synchro.SleepWallclock(sleepDuration * 1000)
예제 #7
0
    def Expand(self):
        animations.Tr2DRotateTo(self.arrow,
                                startAngle=math.pi / 2.0,
                                endAngle=0.0,
                                duration=0.15)
        sortedEntries = sorted(self._entries, key=self._GetEntrySortKey)
        for i, entry in enumerate(sortedEntries):
            entry.display = True
            animations.MoveTo(
                entry,
                startPos=(0, -(entry.height + entry.padTop + entry.padBottom)),
                endPos=(0, 0),
                duration=0.2,
                timeOffset=i * 0.02)
            animations.FadeTo(entry,
                              startVal=0.0,
                              endVal=1.0,
                              duration=0.2,
                              timeOffset=i * 0.02 + 0.1,
                              callback=entry.Enable)

        sleepDuration = len(self._entries) * 0.02 + 0.3
        blue.synchro.SleepWallclock(sleepDuration * 1000)