Esempio n. 1
0
        protected override void Dispose(bool isDisposing)
        {
            bindableMode.UnbindAll();
            bindableRecordingMovingCaretMode.UnbindAll();

            base.Dispose(isDisposing);
        }
Esempio n. 2
0
        protected override void Dispose(bool isDisposing)
        {
            base.Dispose(isDisposing);

            isPaused?.UnbindAll();
            host?.AllowScreenSuspension.RemoveSource(disableSuspensionBindable);
        }
Esempio n. 3
0
        protected override bool OnExiting(Screen next)
        {
            if (ValidForResume && logo != null)
            {
                onExitingLogo();
            }

            OsuScreen nextOsu = next as OsuScreen;

            if (Background != null && !Background.Equals(nextOsu?.Background))
            {
                if (nextOsu != null)
                {
                    //We need to use MakeCurrent in case we are jumping up multiple game screens.
                    nextOsu.Background?.MakeCurrent();
                }
                else
                {
                    Background.Exit();
                }
            }

            if (base.OnExiting(next))
            {
                return(true);
            }

            Beatmap.UnbindAll();
            return(false);
        }
Esempio n. 4
0
        protected override void Dispose(bool isDisposing)
        {
            base.Dispose(isDisposing);

            availableMods?.UnbindAll();
            SelectedMods?.UnbindAll();
        }
Esempio n. 5
0
        protected override void Dispose(bool isDisposing)
        {
            base.Dispose(isDisposing);

            Ruleset.UnbindAll();
            SelectedMods.UnbindAll();
        }
Esempio n. 6
0
        protected override void Dispose(bool isDisposing)
        {
            base.Dispose(isDisposing);

            State.UnbindAll();

            attachDownload(null);
        }
Esempio n. 7
0
        protected override void Dispose(bool isDisposing)
        {
            base.Dispose(isDisposing);

            isPaused?.UnbindAll();

            if (host != null)
            {
                host.AllowScreenSuspension.Value = true;
            }
        }
Esempio n. 8
0
        protected override void Dispose(bool isDisposing)
        {
            base.Dispose(isDisposing);

            beatmaps.BeatmapDownloadBegan -= attachDownload;
            beatmaps.ItemAdded            -= setAdded;

            State.UnbindAll();

            attachDownload(null);
        }
        protected override void Dispose(bool isDisposing)
        {
            base.Dispose(isDisposing);

            if (manager != null)
            {
                manager.DownloadBegan -= attachDownload;
                manager.ItemAdded     -= itemAdded;
            }

            State.UnbindAll();

            attachDownload(null);
        }
        public void TestLeaseReturnedOnUnbindAll(bool revert)
        {
            var leased = original.BeginLease(revert);

            Assert.AreEqual(original.Value, leased.Value);

            leased.Value = 2;

            Assert.AreEqual(original.Value, 2);
            Assert.AreEqual(original.Value, leased.Value);

            original.UnbindAll();

            Assert.AreEqual(original.Value, revert ? 1 : 2);
        }
Esempio n. 11
0
        protected override bool OnExiting(Screen next)
        {
            if (base.OnExiting(next))
            {
                return(true);
            }

            if (Beatmap.Value.Track != null)
            {
                Beatmap.Value.Track.Looping = false;
            }

            selectedMods.UnbindAll();
            Beatmap.Value.Mods.Value = new Mod[] { };

            return(false);
        }
Esempio n. 12
0
        protected override void PrepareForUse()
        {
            base.PrepareForUse();

            lightingColour?.UnbindAll();

            Lighting.ResetAnimation();

            if (JudgedObject != null)
            {
                lightingColour = JudgedObject.AccentColour.GetBoundCopy();
                lightingColour.BindValueChanged(colour => Lighting.Colour = Result.IsHit ? colour.NewValue : Color4.Transparent, true);
            }
            else
            {
                Lighting.Colour = Color4.White;
            }
        }
Esempio n. 13
0
        protected override void PrepareForUse()
        {
            base.PrepareForUse();

            lightingColour?.UnbindAll();

            if (lighting != null)
            {
                if (JudgedObject != null)
                {
                    lightingColour = JudgedObject.AccentColour.GetBoundCopy();
                    lightingColour.BindValueChanged(colour => lighting.Colour = Result.Type == HitResult.Miss ? Color4.Transparent : colour.NewValue, true);
                }
                else
                {
                    lighting.Colour = Color4.White;
                }
            }
        }
Esempio n. 14
0
        public override bool OnExiting(IScreen next)
        {
            if (ValidForResume && logo != null)
            {
                onExitingLogo();
            }

            if (base.OnExiting(next))
            {
                return(true);
            }

            if (localBackground != null && backgroundStack?.CurrentScreen == localBackground)
            {
                backgroundStack?.Exit();
            }

            Beatmap.UnbindAll();
            return(false);
        }
Esempio n. 15
0
        protected override bool OnExiting(Screen next)
        {
            if (modSelect.State == Visibility.Visible)
            {
                modSelect.Hide();
                return(true);
            }

            if (base.OnExiting(next))
            {
                return(true);
            }

            if (Beatmap.Value.Track != null)
            {
                Beatmap.Value.Track.Looping = false;
            }

            SelectedMods.UnbindAll();
            Beatmap.Value.Mods.Value = new Mod[] { };

            return(false);
        }
Esempio n. 16
0
 protected override void Dispose(bool isDisposing)
 {
     base.Dispose(isDisposing);
     mods.UnbindAll();
 }
Esempio n. 17
0
 protected override void Dispose(bool isDisposing)
 {
     NewLanguage.UnbindAll();
     base.Dispose(isDisposing);
 }
Esempio n. 18
0
 void IRecyclable.OnRecycleDestroy()
 {
     state.UnbindAll();
     isActive.UnbindAll();
 }