Exemple #1
0
        public override void OnSuspending(ScreenTransitionEvent e)
        {
            screenSuspension?.RemoveAndDisposeImmediately();

            fadeOut();
            base.OnSuspending(e);
        }
Exemple #2
0
        public override void OnEntering(ScreenTransitionEvent e)
        {
            base.OnEntering(e);

            ApplyToBackground(b =>
            {
                if (epilepsyWarning != null)
                {
                    epilepsyWarning.DimmableBackground = b;
                }
            });

            Beatmap.Value.Track.AddAdjustment(AdjustableProperty.Volume, volumeAdjustment);

            content.ScaleTo(0.7f);

            contentIn();

            MetadataInfo.Delay(750).FadeIn(500);

            // after an initial delay, start the debounced load check.
            // this will continue to execute even after resuming back on restart.
            Scheduler.Add(new ScheduledDelegate(pushWhenLoaded, Clock.CurrentTime + PlayerPushDelay, 0));

            showMuteWarningIfNeeded();
            showBatteryWarningIfNeeded();
        }
Exemple #3
0
        public override void OnEntering(ScreenTransitionEvent e)
        {
            base.OnEntering(e);

            contentContainer.ScaleTo(0.95f).ScaleTo(1, duration, Easing.OutQuint);
            this.FadeInFromZero(duration);
        }
Exemple #4
0
        public override void OnSuspending(ScreenTransitionEvent e)
        {
            base.OnSuspending(e);

            message.TextContainer.MoveTo(new Vector2(-(DrawSize.X / 16), 0), transition_time, Easing.OutExpo);
            this.FadeOut(transition_time, Easing.OutExpo);
        }
 public override void OnResuming(ScreenTransitionEvent e)
 {
     base.OnResuming(e);
     this
     .FadeInFromZero(100)
     .MoveToX(0, 500, Easing.OutQuint);
 }
Exemple #6
0
        public override void OnResuming(ScreenTransitionEvent e)
        {
            base.OnResuming(e);

            if (client.Room == null)
            {
                return;
            }

            Debug.Assert(client.LocalUser != null);

            if (!(e.Last is MultiplayerPlayerLoader playerLoader))
            {
                return;
            }

            // Nothing needs to be done if already in the idle state (e.g. via load being aborted by the server).
            if (client.LocalUser.State == MultiplayerUserState.Idle)
            {
                return;
            }

            // If gameplay wasn't finished, then we have a simple path back to the idle state by aborting gameplay.
            if (!playerLoader.GameplayPassed)
            {
                client.AbortGameplay().FireAndForget();
                return;
            }

            // If gameplay was completed and the user went all the way to results, we'll transition to idle here.
            // Otherwise, the transition will happen in onRoomUpdated().
            transitionFromResults();
        }
Exemple #7
0
            public override void OnEntering(ScreenTransitionEvent e)
            {
                base.OnEntering(e);

                Buttons.ReturnToTopOnIdle = false;
                Buttons.State             = ButtonSystemState.TopLevel;
            }
Exemple #8
0
        public override void OnResuming(ScreenTransitionEvent e)
        {
            base.OnResuming(e);

            message.TextContainer.MoveTo(Vector2.Zero, transition_time, Easing.OutExpo);
            this.FadeIn(transition_time, Easing.OutExpo);
        }
Exemple #9
0
        public override void OnEntering(ScreenTransitionEvent e)
        {
            base.OnEntering(e);

            LoadComponentAsync(precompiler = CreateShaderPrecompiler(), AddInternal);

            // A non-null context factory means there's still content to migrate.
            if (efContextFactory != null)
            {
                LoadComponentAsync(realmMigrator = new EFToRealmMigrator(), AddInternal);
                realmMigrator.MigrationCompleted.ContinueWith(_ => Schedule(() =>
                {
                    // Delay initial screen loading to ensure that the migration is in a complete and sane state
                    // before the intro screen may import the game intro beatmap.
                    LoadComponentAsync(loadableScreen = CreateLoadableScreen());
                }));
            }
            else
            {
                LoadComponentAsync(loadableScreen = CreateLoadableScreen());
            }

            LoadComponentAsync(spinner = new LoadingSpinner(true, true)
            {
                Anchor = Anchor.BottomRight,
                Origin = Anchor.BottomRight,
                Margin = new MarginPadding(40),
            }, _ =>
            {
                AddInternal(spinner);
                spinnerShow = Scheduler.AddDelayed(spinner.Show, 200);
            });

            checkIfLoaded();
        }
        public override void OnEntering(ScreenTransitionEvent e)
        {
            // these will be reverted thanks to PlayerLoader's lease.
            Mods.Value    = Score.Mods;
            Ruleset.Value = Score.Ruleset;

            base.OnEntering(e);
        }
Exemple #11
0
 public override void OnResuming(ScreenTransitionEvent e)
 {
     base.OnResuming(e);
     updateWorkingBeatmap();
     beginHandlingTrack();
     Scheduler.AddOnce(UpdateMods);
     Scheduler.AddOnce(updateRuleset);
 }
        public override void OnSuspending(ScreenTransitionEvent e)
        {
            this
            .FadeOut(100)
            .MoveToX(-offset, 500, Easing.OutQuint);

            base.OnSuspending(e);
        }
Exemple #13
0
 public override void OnResuming(ScreenTransitionEvent e)
 {
     if (IsLoaded)
     {
         this.MoveToX(0, TRANSITION_LENGTH, Easing.OutExpo);
     }
     base.OnResuming(e);
 }
Exemple #14
0
        public override void OnSuspending(ScreenTransitionEvent e)
        {
            base.OnSuspending(e);

            trackAdjustmentStateAtSuspend = musicController.AllowTrackAdjustments;

            onSuspendingLogo();
        }
Exemple #15
0
        public override void OnSuspending(ScreenTransitionEvent e)
        {
            this.ScaleTo(1.1f, 250, Easing.InSine);
            this.FadeOut(250);

            Debug.Assert(screenStack.CurrentScreen != null);
            screenStack.CurrentScreen.OnSuspending(e);
        }
Exemple #16
0
        protected override bool CheckModsAllowFailure() => false; // never fail.

        public override void OnEntering(ScreenTransitionEvent e)
        {
            base.OnEntering(e);

            // finish alpha transforms on entering to avoid gameplay starting in a half-hidden state.
            // the finish calls are purposefully not propagated to children to avoid messing up their state.
            FinishTransforms();
            GameplayClockContainer.FinishTransforms(false, nameof(Alpha));
        }
Exemple #17
0
        public override void OnResuming(ScreenTransitionEvent e)
        {
            base.OnResuming(e);

            if (playerLoader != null)
            {
                Mods.Value   = modsAtGameplayStart;
                playerLoader = null;
            }
        }
Exemple #18
0
        public override void OnSuspending(ScreenTransitionEvent e)
        {
            base.OnSuspending(e);

            // ensure the background is shown, even if the TriangleIntroSequence failed to do so.
            background.ApplyToBackground(b => b.Show());

            // important as there is a clock attached to a track which will likely be disposed before returning to this screen.
            intro.Expire();
        }
Exemple #19
0
        public override void OnResuming(ScreenTransitionEvent e)
        {
            this.FadeIn(250);
            this.ScaleTo(1, 250, Easing.OutSine);

            Debug.Assert(screenStack.CurrentScreen != null);
            screenStack.CurrentScreen.OnResuming(e);

            base.OnResuming(e);
        }
Exemple #20
0
        public override void OnEntering(ScreenTransitionEvent e)
        {
            base.OnEntering(e);
            loadingLayer.Hide();

            if (host?.OnScreenKeyboardOverlapsGameWindow != true)
            {
                focusNextTextBox();
            }
        }
Exemple #21
0
        public override void OnEntering(ScreenTransitionEvent e)
        {
            if (string.IsNullOrEmpty(api?.ProvidedUsername) || game?.UseDevelopmentServer == true)
            {
                this.FadeOut();
                this.Push(new ScreenEntry());
                return;
            }

            base.OnEntering(e);
        }
Exemple #22
0
        public override void OnResuming(ScreenTransitionEvent e)
        {
            base.OnResuming(e);

            ApplyToBackground(b => (b as BackgroundScreenDefault)?.Next());

            // we may have consumed our preloaded instance, so let's make another.
            preloadSongSelect();

            musicController.EnsurePlayingSomething();
        }
Exemple #23
0
        public override void OnSuspending(ScreenTransitionEvent e)
        {
            base.OnSuspending(e);

            Buttons.State = ButtonSystemState.EnteringMode;

            this.FadeOut(FADE_OUT_DURATION, Easing.InSine);
            buttonsContainer.MoveTo(new Vector2(-800, 0), FADE_OUT_DURATION, Easing.InSine);

            sideFlashes.FadeOut(64, Easing.OutQuint);
        }
        public override void OnResuming(ScreenTransitionEvent e)
        {
            base.OnResuming(e);

            // Upon having left a room, we don't know whether we were the only participant, and whether the room is now closed as a result of leaving it.
            // To work around this, temporarily remove the room and trigger an immediate listing poll.
            if (e.Last is MultiplayerMatchSubScreen match)
            {
                RoomManager.RemoveRoom(match.Room);
                ListingPollingComponent.PollImmediately();
            }
        }
Exemple #25
0
        public override void OnEntering(ScreenTransitionEvent e)
        {
            base.OnEntering(e);

            ApplyToBackground(b =>
            {
                b.BlurAmount.Value = BACKGROUND_BLUR;
                b.FadeColour(OsuColour.Gray(0.5f), 250);
            });

            bottomPanel.FadeTo(1, 250);
        }
Exemple #26
0
        public override void OnEntering(ScreenTransitionEvent e)
        {
            base.OnEntering(e);

            previousFrameSyncMode = config.Get <FrameSync>(FrameworkSetting.FrameSync);
            previousActiveHz      = host.UpdateThread.ActiveHz;
            config.SetValue(FrameworkSetting.FrameSync, FrameSync.Unlimited);
            host.UpdateThread.ActiveHz         = target_host_update_frames;
            host.AllowBenchmarkUnlimitedFrames = true;

            musicController.Stop();
        }
Exemple #27
0
        public override void OnSuspending(ScreenTransitionEvent e)
        {
            base.OnSuspending(e);

            BackgroundBrightnessReduction = false;

            // we're moving to player, so a period of silence is upcoming.
            // stop the track before removing adjustment to avoid a volume spike.
            Beatmap.Value.Track.Stop();
            Beatmap.Value.Track.RemoveAdjustment(AdjustableProperty.Volume, volumeAdjustment);
            lowPassFilter.CutoffTo(AudioFilter.MAX_LOWPASS_CUTOFF);
            highPassFilter.CutoffTo(0);
        }
Exemple #28
0
        public override void OnResuming(ScreenTransitionEvent e)
        {
            applyArrivingDefaults(true);

            // it's feasible to resume to a screen if the target screen never loaded successfully.
            // in such a case there's no need to restore this value.
            if (trackAdjustmentStateAtSuspend != null)
            {
                musicController.AllowTrackAdjustments = trackAdjustmentStateAtSuspend.Value;
            }

            base.OnResuming(e);
        }
Exemple #29
0
        public override void OnEntering(ScreenTransitionEvent e)
        {
            if (animateOnEnter)
            {
                this.FadeOut();
                this.MoveToX(x_movement_amount);

                this.FadeIn(TRANSITION_LENGTH, Easing.InOutQuart);
                this.MoveToX(0, TRANSITION_LENGTH, Easing.InOutQuart);
            }

            base.OnEntering(e);
        }
Exemple #30
0
        public override void OnEntering(ScreenTransitionEvent e)
        {
            this.FadeIn();
            waves.Show();

            Mods.SetDefault();

            if (loungeSubScreen.IsCurrentScreen())
            {
                loungeSubScreen.OnEntering(e);
            }
            else
            {
                loungeSubScreen.MakeCurrent();
            }
        }