def AnimEntry(self): super(PurchaseSuccessPanel, self).AnimEntry() sm.GetService('audio').SendUIEvent(self.AUDIO_EVENT) animations.FadeIn(self.iconBackground, duration=0.5, timeOffset=self.TRANSITION_TIME) animations.FadeIn(self.iconForeground, duration=0.5, timeOffset=self.TRANSITION_TIME + 0.5) animations.Tr2DScaleTo(self.iconBackgroundTransform, startScale=(2.0, 2.0), endScale=(1.0, 1.0), duration=0.25, timeOffset=self.TRANSITION_TIME) animations.Tr2DScaleTo(self.iconForegroundTransform, startScale=(2.0, 2.0), endScale=(1.0, 1.0), duration=0.25, timeOffset=self.TRANSITION_TIME + 0.5) if hasattr(self, 'subTextCont'): animations.FadeTo(self.subTextCont, timeOffset=2)
def _animate_reward_content(self): animations.FadeIn(self.reward_event_banner_container, duration=ANIMATED_DEFAULT_FADE_IN_DURATION) animations.FadeIn(self.reward_item_label_container, duration=ANIMATED_DEFAULT_FADE_IN_DURATION) animations.FadeIn(self.reward_header_label_container, duration=ANIMATED_DEFAULT_FADE_IN_DURATION) animations.FadeIn(self.reward_season_points_container, duration=ANIMATED_DEFAULT_FADE_IN_DURATION, callback=self._animate_bottom_container)
def cascade_categories_in(self): for super_cat in self.super_categories: animations.FadeIn(super_cat.category_group_hex, duration=0.5, curveType=uiconst.ANIM_OVERSHOT2) animations.FadeIn(super_cat.label, duration=0.5, curveType=uiconst.ANIM_OVERSHOT2) for sub_cat in super_cat.sub_categories: animations.SpGlowFadeIn(sub_cat.hexagon_outline, glowExpand=2) animations.SpGlowFadeOut(sub_cat.hexagon_outline, glowExpand=2) if sub_cat.unavailable: animations.FadeIn(sub_cat, duration=0.5, curveType=uiconst.ANIM_OVERSHOT2, endVal=0.5) else: animations.FadeIn(sub_cat, duration=0.5, curveType=uiconst.ANIM_OVERSHOT2) blue.synchro.Sleep(15)
def on_training_result_closed(self): self.isSubmitting = False self.increment_level_if_needed() uthread.new(self.new_training_task) animations.FadeIn(self, duration=1) animations.FadeIn(self.main_button_container) animations.FadeIn(self.training_task_image.colorFilterContainer) animations.FadeIn(self.task_label, timeOffset=1) animations.FadeIn(self.refresh_task_button) self.training_task_image.state = uiconst.UI_NORMAL self.left_main_container.state = uiconst.UI_NORMAL self.category_container.state = uiconst.UI_NORMAL self.main_button_container.state = uiconst.UI_NORMAL
def thread(): self.details = ContainerAutoSize(parent=self, align=uiconst.TOTOP, clipChildren=True) self.details.DisableAutoSize() EveLabelMedium(parent=self.details, align=uiconst.TOTOP, padding=(6, 3, 6, 2), text=self.quest.descriptionLabel) EveLabelMedium( parent=self.details, align=uiconst.TOTOP, padding=(6, 3, 6, 2), text=localization.GetByLabel('UI/Quest/RewardTitle')) EveLabelMedium(parent=self.details, align=uiconst.TOTOP, padding=(12, 6, 6, 12), text=self.quest.rewardLabel) _, height = self.details.GetAutoSize() animations.FadeIn(self.details, duration=0.3) animations.MorphScalar(self.details, 'height', startVal=self.details.height, endVal=height, duration=0.25, callback=self.details.EnableAutoSize)
def show_and_blink_explanation_icon(self): self.explanation_icon.SetAlpha(0) self.explanation_icon.SetState(uiconst.UI_NORMAL) animations.FadeIn(self.explanation_icon, duration=1, loops=5, curveType=uiconst.ANIM_OVERSHOT5)
def Layout(self): self.HideHeader() self.MakeUnResizeable() self.SetWndIcon(self.iconNum, mainTop=2, mainLeft=6) self.SetTopparentHeight(self.TOP_PARENT_HEIGHT) station = cfg.stations.Get(session.stationid2) WndCaptionLabel(parent=self.sr.topParent, align=uiconst.RELATIVE, text=localization.GetByLabel('UI/Medical/Medical'), subcaption=station.stationName) self.container = ContainerAutoSize(parent=self.GetMainArea(), align=uiconst.TOTOP, alignMode=uiconst.TOTOP, state=uiconst.UI_PICKCHILDREN, padding=(self.PADDING, self.PADDING, self.PADDING, self.PADDING), callback=self.OnContainerResized, opacity=0.0) EveLabelLargeBold( parent=self.container, align=uiconst.TOTOP, text=localization.GetByLabel('UI/Medical/MedicalClone')) EveLabelMedium( parent=self.container, align=uiconst.TOTOP, text=localization.GetByLabel('UI/Medical/MedicalCloneDescription'), color=GRAY_COLOR, padding=(0, 0, 0, self.HALF_PADDING)) self.homeStation = CreateSectionContainer(self.container) EveLabelLargeBold( parent=self.container, align=uiconst.TOTOP, text=localization.GetByLabel('UI/Medical/ActiveClone'), padding=(0, self.PADDING, 0, 0)) EveLabelMedium(parent=self.container, align=uiconst.TOTOP, text=localization.GetByLabel( 'UI/Medical/DestroyActiveCloneDescription'), color=GRAY_COLOR, padding=(0, 0, 0, self.HALF_PADDING)) EveLabelMediumBold(parent=self.container, align=uiconst.TOTOP, text=localization.GetByLabel( 'UI/Medical/DestroyActiveCloneWarning'), color=RED_COLOR, padding=(0, 0, 0, self.HALF_PADDING)) self.activeClone = CreateSectionContainer(self.container) EveLabelLargeBold(parent=self.container, align=uiconst.TOTOP, text=localization.GetByLabel('UI/Medical/JumpClone'), padding=(0, self.PADDING, 0, 0)) EveLabelMedium( parent=self.container, align=uiconst.TOTOP, text=localization.GetByLabel('UI/Medical/JumpCloneDescription'), color=GRAY_COLOR, padding=(0, 0, 0, self.HALF_PADDING)) self.jumpClone = CreateSectionContainer(self.container) animations.FadeIn(self.container, duration=0.5)
def UpdateLockedStatus(self): opacity = 0.6 if self.data.isLocked else 1.0 animations.FadeTo(self, startVal=self.opacity, endVal=opacity) if self.data.isLocked: self.CheckConstructLockIcon() animations.FadeIn(self.lockedIcon, duration=0.3) elif self.lockedIcon is not None: animations.FadeOut(self.lockedIcon, duration=0.3)
def start_transmission_animation(self): self.reset_animation() self.audio_service.SendUIEvent(const.Sounds.ProcessingPlay) self.hide_mini_map() self.percentage = 0 self.move_image_in() self.fade_out_active_image() animations.FadeIn(self.transmitting_container, duration=0.5) self.start_percentage_count()
def CreateTooltip(self, parent, owner, idx): self.tooltipPanel = tooltips.TooltipPanel(parent=parent, owner=owner, idx=idx) self.tooltipPanel.LoadGeneric1ColumnTemplate() self.tooltipPanel.SetState(uiconst.UI_NORMAL) self.add_description_label() self.add_main_image_container() self.add_example_images() animations.FadeIn(self.imageOverlaySprite, timeOffset=0.1, duration=2, curveType=uiconst.ANIM_OVERSHOT5) return self.tooltipPanel
def OnClick(self, *args): if self.exclude_texture.state is not uiconst.UI_HIDDEN or self.unclickable is True: return sm.GetService('audio').SendUIEvent(const.Sounds.CategorySelectPlay) self.category['selected'] = not self.category['selected'] if self.category['selected']: animations.FadeIn(self.selected_texture, **self.GLOW_ANIMATION) else: animations.FadeOut(self.selected_texture, **self.GLOW_ANIMATION) sm.ScatterEvent(const.Events.CategoryChanged, self)
def AnimExpand(self): animations.MorphScalar(self, 'width', startVal=self.width, endVal=ENTRY_EXPANDED_WIDTH, duration=0.15) animations.FadeIn(self.selectionGradient, endVal=0.4, duration=0.1, curveType=uiconst.ANIM_OVERSHOT) self._AnimShowIconGlow()
def AnimComplete(self): self.check.SetTexturePath(RES_COMPLETED) animations.BlinkIn(self.check) animations.MorphScalar(self.completedFill, 'displayWidth', startVal=0.0, endVal=self.displayWidth) animations.FadeTo(self.completedFill, startVal=1.5, endVal=0.5, duration=1.5, timeOffset=0.5) animations.FadeIn(self.timer, endVal=0.6, timeOffset=0.5)
def RevealContainerContent(container): _, height = container.GetAutoSize() if height != container.height: animations.MorphScalar(container, 'height', startVal=container.height, endVal=height, duration=0.5, curveType=uiconst.ANIM_OVERSHOT) for background in container.background: if background.name == 'blinkSprite': background.Show() animations.SpSwoopBlink(background, rotation=math.pi * 0.75, duration=0.5) for child in container.children: animations.FadeIn(child, endVal=child.opacity or 1.0, duration=0.4) blue.synchro.SleepWallclock(500)
def _animate_in(self): animations.FadeIn(self, duration=1) animations.FadeIn(self.main_button_container) animations.FadeIn(self.task_image.colorFilterContainer) animations.FadeIn(self.task_label) animations.FadeIn(self.checkbox_container) animations.FadeIn(self.new_task_button) self.new_task_button.SetState(uiconst.UI_NORMAL) self.category_selector.cascade_categories_in()
def ExitCompactMode(self): if not self.compactMode: return self.compactMode = False animations.FadeIn(self.characters, duration=0.2) animations.MorphScalar(self.characters, 'left', startVal=self.characters.left, endVal=self.CHARACTERS_LEFT, duration=0.3) animations.MorphScalar(self.content, 'left', startVal=self.content.left, endVal=self.CONTENT_LEFT, duration=0.3)
def Layout(self): self.HideHeader() self.MakeUnResizeable() self.SetWndIcon(self.iconNum, mainTop=2, mainLeft=6) self.SetTopparentHeight(self.TOP_PARENT_HEIGHT) locationInfo = cfg.evelocations.Get(self.currentLocationID) WndCaptionLabel(parent=self.sr.topParent, align=uiconst.RELATIVE, text=localization.GetByLabel('UI/Medical/Medical'), subcaption=locationInfo.name) self.container = ContainerAutoSize(parent=self.GetMainArea(), align=uiconst.TOTOP, alignMode=uiconst.TOTOP, state=uiconst.UI_PICKCHILDREN, padding=(self.PADDING, self.PADDING, self.PADDING, self.PADDING), callback=self.OnContainerResized, opacity=0.0) EveLabelLargeBold( parent=self.container, align=uiconst.TOTOP, text=localization.GetByLabel('UI/Medical/MedicalClone')) EveLabelMedium( parent=self.container, align=uiconst.TOTOP, text=localization.GetByLabel('UI/Medical/MedicalCloneDescription'), color=GRAY_COLOR, padding=(0, 0, 0, self.HALF_PADDING)) self.homeStation = CreateSectionContainer(self.container) if self.medicalController.HasAbilityToActivateClone(): self.AddSelfDestructSection() EveLabelLargeBold(parent=self.container, align=uiconst.TOTOP, text=localization.GetByLabel('UI/Medical/JumpClone'), padding=(0, self.PADDING, 0, 0)) EveLabelMedium( parent=self.container, align=uiconst.TOTOP, text=localization.GetByLabel('UI/Medical/JumpCloneDescription'), color=GRAY_COLOR, padding=(0, 0, 0, self.HALF_PADDING)) self.jumpClone = CreateSectionContainer(self.container) animations.FadeIn(self.container, duration=0.5)
def _AnimShowStateIcon(self, icon): def continue_glowExpand(): animations.MorphScalar(icon, 'glowExpand', startVal=0.0, endVal=20.0, duration=0.5, curveType=uiconst.ANIM_SMOOTH) animations.SpColorMorphTo(icon, attrName='glowColor', startColor=(1.0, 1.0, 1.0, 0.5), endColor=(0.0, 0.0, 0.0, 0.0), duration=0.25, curveType=uiconst.ANIM_SMOOTH) animations.FadeIn(icon, duration=0.15, timeOffset=0.15) animations.SpColorMorphTo(icon, startColor=(0.0, 0.0, 0.0, 0.0), endColor=(1.0, 1.0, 1.0, 1.0), duration=0.15, timeOffset=0.2, curveType=uiconst.ANIM_SMOOTH) animations.SpColorMorphTo(icon, attrName='glowColor', startColor=(0.3, 0.3, 0.3, 0.0), endColor=(1.0, 1.0, 1.0, 0.5), duration=0.15, timeOffset=0.2, curveType=uiconst.ANIM_SMOOTH) animations.MorphScalar(icon, 'glowExpand', startVal=30.0, endVal=0.0, duration=0.2, timeOffset=0.15, curveType=uiconst.ANIM_SMOOTH, callback=continue_glowExpand) animations.FadeTo(self.stateIconLight, startVal=0.0, endVal=0.15, duration=0.55, timeOffset=0.15, curveType=uiconst.ANIM_BOUNCE)
def AnimShow(self): for child in self.children: animations.FadeIn(child, duration=0.3, timeOffset=0.1) self.EnableAutoSize() self.DisableAutoSize() animations.MorphScalar(self, 'height', startVal=0, endVal=self.height, duration=0.3) animations.MorphScalar(self, 'padTop', startVal=0, endVal=self.PAD_TOP, duration=0.3) animations.MorphScalar(self, 'padBottom', startVal=0, endVal=self.PAD_BOTTOM, duration=0.3, sleep=True) self.EnableAutoSize()
def OnSweepStarted(self, systemReadyTime, durationInSec, viewAngleInPlane, orderedDelayAndSiteList, sweepStartDelayMSec): logger.debug( 'OnSweepStarted readyTime=%s durationInSec=%s angle=%s sweepStartDelayMSec=%s', systemReadyTime, durationInSec, viewAngleInPlane, sweepStartDelayMSec) timeNow = blue.os.GetWallclockTime() timeSinceStartSec = float(timeNow - systemReadyTime) / SEC if timeSinceStartSec > sweepStartDelayMSec: logger.debug( 'OnSweepStarted too late. timeSinceStartSec=%s timeNow=%s', timeSinceStartSec, timeNow) self.UpdateVisibleSites() self.OnSweepEnded() return timeOffset = sweepStartDelayMSec - timeSinceStartSec self.UpdateVisibleSites() animations.FadeTo(self.sweepTransform, duration=durationInSec, startVal=0.0, endVal=0.0, curveType=((0.05, 1.0), (0.95, 1.0)), timeOffset=timeOffset) viewAngleInPlane += MATH_PI_2 animations.Tr2DRotateTo(self.sweepTransform, duration=durationInSec, startAngle=viewAngleInPlane, endAngle=viewAngleInPlane + MATH_2_PI, curveType=uiconst.ANIM_LINEAR, timeOffset=timeOffset) for delaySec, siteData in orderedDelayAndSiteList: indicator = self.siteIndicatorsBySiteID.get(siteData.siteID) if indicator: animations.FadeIn(indicator, duration=0.2, curveType=uiconst.ANIM_OVERSHOT, timeOffset=delaySec - timeSinceStartSec)
def fade_badge_in(self): self.rank_icon.SetTexturePath(self.get_rank_icon_path()) animations.FadeIn(self.rank_icon, timeOffset=0.2, duration=0.5, curveType=uiconst.ANIM_OVERSHOT5) self.rank_label.SetText(localization.GetByLabel('UI/ProjectDiscovery/RankTitles/RankTitle' + str(self.rank_band))) animations.FadeIn(self.rank_label, timeOffset=0.2, duration=0.4, curveType=uiconst.ANIM_OVERSHOT5)
def AnimStatePending(self): animations.FadeOut(self.appliedIcon, duration=0.15) animations.FadeOut(self.previewedIcon, duration=0.15) animations.FadeIn(self.pendingIcon, duration=0.15)
def AnimShow(self, delay=0.0): animations.FadeIn(self.blinkFill, endVal=0.4, curveType=uiconst.ANIM_WAVE, duration=0.4, timeOffset=delay * 1.4 + 0.4)
def start(self): self.reset_processing_screen() animations.FadeIn(self, timeOffset=0.1, callback=self.expand_screen, duration=0.5)
def _StopActivationPendingAnimation(self): if self.activationPendingCurve: self.activationPendingCurve.Stop() self.activationPendingCurve = None animations.FadeIn(self.abilityIcon)
def fade_in(self): self.update_rank_values() animations.FadeIn(self, duration=0.5, callback=self.update_score_bar) sm.GetService('audio').SendUIEvent(const.Sounds.RewardsWindowLoopPlay) self.enable_button()
def prepare_result_screen(self): self.left_main_container.state = uiconst.UI_NORMAL animations.FadeIn(self.task_image.colorFilterContainer) self.result_window.open() uthread.new(self.wait_for_result)
def animate_normal_background(self): animations.FadeOut(self.result_background, duration=0.5) animations.FadeIn(self.gridBackground, duration=1, curveType=uiconst.ANIM_OVERSHOT5)
def animate_result_background_in(self): animations.FadeOut(self.gridBackground, duration=0.5) animations.FadeIn(self.result_background, duration=1, curveType=uiconst.ANIM_OVERSHOT5, endVal=1.5)
def AnimEntry(self): animations.FadeIn(self, duration=self.TRANSITION_TIME, timeOffset=self.TRANSITION_TIME)