コード例 #1
0
    def enterVisible(self):
        SCObject.enterVisible(self)
        self.privScheduleFinalize()
        for member in self:
            if member.isViewable():
                if not member.isVisible():
                    member.enterVisible()

        self.childHasFaded = 0
        alreadyFaded = 0
        parentMenu = None
        if self.holder is not None:
            if self.holder.parentMenu is not None:
                parentMenu = self.holder.parentMenu
                alreadyFaded = parentMenu.childHasFaded
        if SCMenu.WantFade:
            if alreadyFaded:
                self.fadeFunc(1.0)
            else:
                self.stopFade()
                self.fadeIval = LerpFunctionInterval(
                    self.fadeFunc,
                    fromData=0.0,
                    toData=1.0,
                    duration=SCMenu.FadeDuration)
                self.fadeIval.play()
                if parentMenu is not None:
                    parentMenu.childHasFaded = 1
コード例 #2
0
    def enterVisible(self):
        SCObject.enterVisible(self)
        self.privScheduleFinalize()

        # tell our members that they're visible now
        for member in self:
            if member.isViewable():
                if not member.isVisible():
                    member.enterVisible()

        # we are just becoming visible, so reset our child fade flag
        self.childHasFaded = 0

        # if a sibling menu has already faded in, don't fade in again
        alreadyFaded = 0
        parentMenu = None
        if self.holder is not None:
            if self.holder.parentMenu is not None:
                parentMenu = self.holder.parentMenu
                alreadyFaded = parentMenu.childHasFaded

        if SCMenu.WantFade:
            if alreadyFaded:
                self.fadeFunc(1.)
            else:
                self.stopFade()
                self.fadeIval = LerpFunctionInterval(
                    self.fadeFunc,
                    fromData=0.,
                    toData=1.,
                    duration=SCMenu.FadeDuration)
                self.fadeIval.play()
                if parentMenu is not None:
                    parentMenu.childHasFaded = 1
コード例 #3
0
 def enterVisible(self):
     SCObject.enterVisible(self)
     self.privScheduleFinalize()