Beispiel #1
0
 protected override void LogoExiting(OsuLogo logo)
 {
     base.LogoExiting(logo);
     logo.ScaleTo(0.2f, logo_transition / 2, Easing.Out);
     logo.FadeOut(logo_transition / 2, Easing.Out);
 }
Beispiel #2
0
 /// <summary>
 /// Fired when this screen was exited to add any outwards transition to the logo.
 /// </summary>
 protected virtual void LogoExiting(OsuLogo logo)
 {
 }
Beispiel #3
0
 protected override void LogoExiting(OsuLogo logo)
 {
     base.LogoExiting(logo);
     content.StopTracking();
 }
Beispiel #4
0
 protected override void LogoArriving(OsuLogo logo, bool resuming)
 {
     // call base with resuming forcefully set to true to reduce logo movements.
     base.LogoArriving(logo, true);
     logo.FinishTransforms(true, nameof(Scale));
 }
Beispiel #5
0
 protected override void LogoArriving(OsuLogo logo, bool resuming)
 {
     base.LogoArriving(logo, resuming);
     Child.FadeInFromZero(200);
 }
Beispiel #6
0
 protected override void LogoArriving(OsuLogo logo, bool resuming)
 {
     Logo = logo;
     base.LogoArriving(logo, resuming);
 }
Beispiel #7
0
 /// <summary>
 /// Fired when this screen was entered or resumed and the logo state is required to be adjusted.
 /// </summary>
 protected virtual void LogoArriving(OsuLogo logo, bool resuming)
 {
     ApplyLogoArrivingDefaults(logo);
 }
Beispiel #8
0
 protected override void LogoExiting(OsuLogo logo)
 {
     // the wave overlay transition takes longer than expected to run.
     logo.Delay(WaveContainer.DISAPPEAR_DURATION / 2).FadeOut();
     base.LogoExiting(logo);
 }
Beispiel #9
0
        private void load()
        {
            if (!Host.IsPrimaryInstance && !DebugUtils.IsDebugBuild)
            {
                Logger.Log(@"osu! does not support multiple running instances.", LoggingTarget.Runtime, LogLevel.Error);
                Environment.Exit(0);
            }

            if (args?.Length > 0)
            {
                var paths = args.Where(a => !a.StartsWith('-')).ToArray();
                if (paths.Length > 0)
                {
                    Task.Run(() => Import(paths));
                }
            }

            dependencies.CacheAs(this);

            dependencies.Cache(SentryLogger);

            dependencies.Cache(osuLogo = new OsuLogo {
                Alpha = 0
            });

            // bind config int to database RulesetInfo
            configRuleset = LocalConfig.GetBindable <int>(OsuSetting.Ruleset);

            var preferredRuleset = RulesetStore.GetRuleset(configRuleset.Value);

            try
            {
                Ruleset.Value = preferredRuleset ?? RulesetStore.AvailableRulesets.First();
            }
            catch (Exception e)
            {
                // on startup, a ruleset may be selected which has compatibility issues.
                Logger.Error(e, $@"Failed to switch to preferred ruleset {preferredRuleset}.");
                Ruleset.Value = RulesetStore.AvailableRulesets.First();
            }

            Ruleset.ValueChanged += r => configRuleset.Value = r.NewValue.ID ?? 0;

            // bind config int to database SkinInfo
            configSkin = LocalConfig.GetBindable <int>(OsuSetting.Skin);
            SkinManager.CurrentSkinInfo.ValueChanged += skin => configSkin.Value = skin.NewValue.ID;
            configSkin.ValueChanged += skinId =>
            {
                var skinInfo = SkinManager.Query(s => s.ID == skinId.NewValue);

                if (skinInfo == null)
                {
                    switch (skinId.NewValue)
                    {
                    case -1:
                        skinInfo = DefaultLegacySkin.Info;
                        break;

                    default:
                        skinInfo = SkinInfo.Default;
                        break;
                    }
                }

                SkinManager.CurrentSkinInfo.Value = skinInfo;
            };
            configSkin.TriggerChange();

            IsActive.BindValueChanged(active => updateActiveState(active.NewValue), true);

            Audio.AddAdjustment(AdjustableProperty.Volume, inactiveVolumeFade);

            SelectedMods.BindValueChanged(modsChanged);
            Beatmap.BindValueChanged(beatmapChanged, true);
        }
Beispiel #10
0
        private void load()
        {
            dependencies.CacheAs(this);

            dependencies.Cache(SentryLogger);

            dependencies.Cache(osuLogo = new OsuLogo {
                Alpha = 0
            });

            // bind config int to database RulesetInfo
            configRuleset = LocalConfig.GetBindable <string>(OsuSetting.Ruleset);
            uiScale       = LocalConfig.GetBindable <float>(OsuSetting.UIScale);

            var preferredRuleset = int.TryParse(configRuleset.Value, out int rulesetId)
                                   // int parsing can be removed 20220522
                ? RulesetStore.GetRuleset(rulesetId)
                : RulesetStore.GetRuleset(configRuleset.Value);

            try
            {
                Ruleset.Value = preferredRuleset ?? RulesetStore.AvailableRulesets.First();
            }
            catch (Exception e)
            {
                // on startup, a ruleset may be selected which has compatibility issues.
                Logger.Error(e, $@"Failed to switch to preferred ruleset {preferredRuleset}.");
                Ruleset.Value = RulesetStore.AvailableRulesets.First();
            }

            Ruleset.ValueChanged += r => configRuleset.Value = r.NewValue.ShortName;

            // bind config int to database SkinInfo
            configSkin = LocalConfig.GetBindable <string>(OsuSetting.Skin);
            SkinManager.CurrentSkinInfo.ValueChanged += skin => configSkin.Value = skin.NewValue.ID.ToString();
            configSkin.ValueChanged += skinId =>
            {
                ILive <SkinInfo> skinInfo = null;

                if (Guid.TryParse(skinId.NewValue, out var guid))
                {
                    skinInfo = SkinManager.Query(s => s.ID == guid);
                }

                if (skinInfo == null)
                {
                    if (guid == SkinInfo.CLASSIC_SKIN)
                    {
                        skinInfo = DefaultLegacySkin.CreateInfo().ToLive();
                    }
                }

                SkinManager.CurrentSkinInfo.Value = skinInfo ?? DefaultSkin.CreateInfo().ToLive();
            };
            configSkin.TriggerChange();

            IsActive.BindValueChanged(active => updateActiveState(active.NewValue), true);

            Audio.AddAdjustment(AdjustableProperty.Volume, inactiveVolumeFade);

            SelectedMods.BindValueChanged(modsChanged);
            Beatmap.BindValueChanged(beatmapChanged, true);
        }
Beispiel #11
0
        private void load()
        {
            dependencies.CacheAs(this);

            dependencies.Cache(SentryLogger);

            dependencies.Cache(osuLogo = new OsuLogo {
                Alpha = 0
            });

            // bind config int to database RulesetInfo
            configRuleset = LocalConfig.GetBindable <int>(OsuSetting.Ruleset);
            uiScale       = LocalConfig.GetBindable <float>(OsuSetting.UIScale);

            var preferredRuleset = RulesetStore.GetRuleset(configRuleset.Value);

            try
            {
                Ruleset.Value = preferredRuleset ?? RulesetStore.AvailableRulesets.First();
            }
            catch (Exception e)
            {
                // on startup, a ruleset may be selected which has compatibility issues.
                Logger.Error(e, $@"Failed to switch to preferred ruleset {preferredRuleset}.");
                Ruleset.Value = RulesetStore.AvailableRulesets.First();
            }

            Ruleset.ValueChanged += r => configRuleset.Value = r.NewValue.ID ?? 0;

            // bind config int to database SkinInfo
            configSkin = LocalConfig.GetBindable <int>(OsuSetting.Skin);
            SkinManager.CurrentSkinInfo.ValueChanged += skin => configSkin.Value = skin.NewValue.ID;
            configSkin.ValueChanged += skinId =>
            {
                var skinInfo = SkinManager.Query(s => s.ID == skinId.NewValue);

                if (skinInfo == null)
                {
                    switch (skinId.NewValue)
                    {
                    case -1:
                        skinInfo = DefaultLegacySkin.Info;
                        break;

                    default:
                        skinInfo = SkinInfo.Default;
                        break;
                    }
                }

                SkinManager.CurrentSkinInfo.Value = skinInfo;
            };
            configSkin.TriggerChange();

            IsActive.BindValueChanged(active => updateActiveState(active.NewValue), true);

            Audio.AddAdjustment(AdjustableProperty.Volume, inactiveVolumeFade);

            SelectedMods.BindValueChanged(modsChanged);
            Beatmap.BindValueChanged(beatmapChanged, true);
        }
Beispiel #12
0
 protected override void LogoExiting(OsuLogo logo)
 {
 }
Beispiel #13
0
 protected override void LogoArriving(OsuLogo logo, bool resuming)
 {
 }
Beispiel #14
0
 /// <summary>
 /// Fired when this screen was suspended to add any outwards transition to the logo.
 /// </summary>
 protected virtual void LogoSuspending(OsuLogo logo)
 {
 }
        private void load(FrameworkConfigManager frameworkConfig)
        {
            this.frameworkConfig = frameworkConfig;

            if (!Host.IsPrimaryInstance && !DebugUtils.IsDebugBuild)
            {
                Logger.Log(@"osu! does not support multiple running instances.", LoggingTarget.Runtime, LogLevel.Error);
                Environment.Exit(0);
            }

            if (args?.Length > 0)
            {
                var paths = args.Where(a => !a.StartsWith(@"-")).ToArray();
                if (paths.Length > 0)
                {
                    Task.Run(() => Import(paths));
                }
            }

            dependencies.CacheAs(this);

            dependencies.Cache(RavenLogger);

            dependencies.Cache(osuLogo = new OsuLogo {
                Alpha = 0
            });

            // bind config int to database RulesetInfo
            configRuleset         = LocalConfig.GetBindable <int>(OsuSetting.Ruleset);
            Ruleset.Value         = RulesetStore.GetRuleset(configRuleset.Value) ?? RulesetStore.AvailableRulesets.First();
            Ruleset.ValueChanged += r => configRuleset.Value = r.NewValue.ID ?? 0;

            // bind config int to database SkinInfo
            configSkin = LocalConfig.GetBindable <int>(OsuSetting.Skin);
            SkinManager.CurrentSkinInfo.ValueChanged += skin => configSkin.Value = skin.NewValue.ID;
            configSkin.ValueChanged += skinId =>
            {
                var skinInfo = SkinManager.Query(s => s.ID == skinId.NewValue);

                if (skinInfo == null)
                {
                    switch (skinId.NewValue)
                    {
                    case -1:
                        skinInfo = DefaultLegacySkin.Info;
                        break;

                    default:
                        skinInfo = SkinInfo.Default;
                        break;
                    }
                }

                SkinManager.CurrentSkinInfo.Value = skinInfo;
            };
            configSkin.TriggerChange();

            IsActive.BindValueChanged(active => updateActiveState(active.NewValue), true);

            Audio.AddAdjustment(AdjustableProperty.Volume, inactiveVolumeFade);

            Beatmap.BindValueChanged(beatmapChanged, true);
        }
Beispiel #16
0
 protected override void LogoSuspending(OsuLogo logo)
 {
     base.LogoSuspending(logo);
     logo.FadeOut(logo.Alpha * 400);
 }
Beispiel #17
0
 public TestCaseLoaderAnimation()
 {
     Child = logo = new OsuLogo {
         Depth = float.MinValue
     };
 }