def FadeOutTransition(self): if not self.opacity or self.fadeoutState == FADE_STATE_OUT: return self.fadeoutState = FADE_STATE_OUT timeScale = 1.0 wasCacheContent = self.cacheContents self.cacheContents = False l, t, w, h = self.GetAbsolute() transform = Transform( parent=self.parent, state=uiconst.UI_DISABLED, align=uiconst.TOALL, scalingCenter=(float(l + w / 2) / uicore.desktop.width, float(t + h / 2) / uicore.desktop.height), scaling=(1.0, 1.0), idx=self.parent.children.index(self)) self.SetParent(transform) self.transitionBox = WindowTransition(parent=transform, pos=self.pos) uicore.animations.BlinkOut(self.transitionBox.cornerPoints, loops=5, duration=0.3 * timeScale) uicore.animations.FadeOut(self, duration=0.2 * timeScale, sleep=True) uicore.animations.FadeTo(self.transitionBox.whiteFill, startVal=0.2, endVal=0.05, duration=0.1 * timeScale, sleep=True) uicore.animations.SpColorMorphTo(self.transitionBox.whiteFill, startColor=(0, 0, 0, 0.1), endColor=(1, 1, 1, 0.1), duration=0.1 * timeScale) uicore.animations.Tr2DScaleTo(transform, startScale=(1.0, 1.0), endScale=(1.0, 0.0), duration=0.3 * timeScale, sleep=True) if not self.destroyed: self.SetParent(uicore.layer.main, idx=0) self.cacheContents = wasCacheContent transform.Close()
def Close(self, *args): Transform.Close(self, *args) self.connections = None self.slotsByID = None
def Close(self): Transform.Close(self) if self.closeCallback is not None: self.closeCallback()