protected override void LoadComplete() { base.LoadComplete(); ShowHud.BindValueChanged(visible => hideTargets.ForEach(d => d.FadeTo(visible.NewValue ? 1 : 0, fade_duration, fade_easing))); ShowHealthbar.BindValueChanged(healthBar => { if (healthBar.NewValue) { HealthDisplay.FadeIn(fade_duration, fade_easing); topScoreContainer.MoveToY(30, fade_duration, fade_easing); } else { HealthDisplay.FadeOut(fade_duration, fade_easing); topScoreContainer.MoveToY(0, fade_duration, fade_easing); } }, true); configShowHud.BindValueChanged(visible => { if (!ShowHud.Disabled) { ShowHud.Value = visible.NewValue; } }, true); replayLoaded.BindValueChanged(replayLoadedValueChanged, true); }
private void load(OsuConfigManager config, NotificationOverlay notificationOverlay) { BindProcessor(scoreProcessor); BindDrawableRuleset(drawableRuleset); Progress.Objects = drawableRuleset.Objects; Progress.AllowSeeking = drawableRuleset.HasReplayLoaded.Value; Progress.RequestSeek = time => RequestSeek(time); Progress.ReferenceClock = drawableRuleset.FrameStableClock; ModDisplay.Current.Value = mods; showHud = config.GetBindable <bool>(OsuSetting.ShowInterface); showHud.BindValueChanged(visible => visibilityContainer.FadeTo(visible.NewValue ? 1 : 0, duration, easing), true); ShowHealthbar.BindValueChanged(healthBar => { if (healthBar.NewValue) { HealthDisplay.FadeIn(duration, easing); topScoreContainer.MoveToY(30, duration, easing); } else { HealthDisplay.FadeOut(duration, easing); topScoreContainer.MoveToY(0, duration, easing); } }, true); if (!showHud.Value && !hasShownNotificationOnce) { hasShownNotificationOnce = true; notificationOverlay?.Post(new SimpleNotification { Text = @"The score overlay is currently disabled. You can toggle this by pressing Shift+Tab." }); } }