private void load(SentakkiRulesetConfigManager settings, OsuColour colours, DrawableSentakkiRuleset ruleset, IAPIProvider api, SkinManager skinManager) { FillAspectRatio = 1; FillMode = FillMode.Fit; RelativeSizeAxes = Axes.Both; Size = new Vector2(.99f); Anchor = Anchor.Centre; Origin = Anchor.Centre; Child = visualisation = new LogoVisualisation { RelativeSizeAxes = Axes.Both, Anchor = Anchor.Centre, Origin = Anchor.Centre, }; user = api.LocalUser.GetBoundCopy(); skin = skinManager.CurrentSkin.GetBoundCopy(); user.ValueChanged += _ => colorOption.TriggerChange(); skin.BindValueChanged(_ => colorOption.TriggerChange(), true); settings?.BindWith(SentakkiRulesetSettings.KiaiEffects, kiaiEffect); kiaiEffect.TriggerChange(); settings?.BindWith(SentakkiRulesetSettings.RingColor, colorOption); // I know that these colors should directly affect AccentColour, but the outcome is not desireable with certain colors // Instead, I'll just change the main drawable color to retain the better looking transparency with all colors. // AccentColour is being forced to be White to counter the LogoVisualisation's bindables // Definitely needs cleaner code to do this, perhaps another Visualisation class... colorOption.BindValueChanged(option => { if (option.NewValue == ColorOption.Default) { visualisation.FadeColour(Color4.White, 200); visualisation.AccentColour = Color4.White.Opacity(.2f); } else if (option.NewValue == ColorOption.Difficulty) { visualisation.FadeColour(colours.ForDifficultyRating(ruleset?.Beatmap.BeatmapInfo.DifficultyRating ?? DifficultyRating.Normal, true), 200); visualisation.AccentColour = Color4.White.Opacity(.2f); } else if (option.NewValue == ColorOption.Skin) { visualisation.FadeColour(skin.Value.GetConfig <GlobalSkinColours, Color4>(GlobalSkinColours.MenuGlow)?.Value ?? Color4.White, 200); visualisation.AccentColour = Color4.White.Opacity(.2f); } }); }
private void load(TauRulesetConfigManager settings) { RelativeSizeAxes = Axes.Both; Size = new Vector2(UNIVERSAL_SCALE); Anchor = Anchor.Centre; Origin = Anchor.Centre; Child = visualisation = new LogoVisualisation { RelativeSizeAxes = Axes.Both, FillMode = FillMode.Fit, FillAspectRatio = 1, Blending = BlendingParameters.Additive, Anchor = Anchor.Centre, Origin = Anchor.Centre, Colour = Color4.Transparent }; settings?.BindWith(TauRulesetSettings.ShowVisualizer, ShowVisualisation); ShowVisualisation.BindValueChanged(value => { visualisation.FadeTo(value.NewValue ? 1 : 0, 500); }); }
private void load(TauRulesetConfigManager settings) { RelativeSizeAxes = Axes.Both; Size = new Vector2(0.6f); Anchor = Anchor.Centre; Origin = Anchor.Centre; Child = visualisation = new LogoVisualisation { RelativeSizeAxes = Axes.Both, FillMode = FillMode.Fit, FillAspectRatio = 1, Blending = BlendingParameters.Additive, Anchor = Anchor.Centre, Origin = Anchor.Centre, Colour = Color4.Transparent }; ShowVisualisation = settings.GetBindable <bool>(TauRulesetSettings.ShowVisualizer); ShowVisualisation.ValueChanged += value => { visualisation.FadeTo(value.NewValue ? 1 : 0, 500); }; ShowVisualisation.TriggerChange(); }