Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Givikap120 committed Aug 25, 2024
1 parent d93ca3d commit 1695bd8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions osu.Game.Rulesets.Osu/Mods/OsuModTraceable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
// See the LICENCE file in the repository root for full licence text.

using System;
using osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Localisation;
using osu.Game.Configuration;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Drawables;
Expand All @@ -16,6 +18,9 @@ namespace osu.Game.Rulesets.Osu.Mods
{
public class OsuModTraceable : ModWithVisibilityAdjustment, IRequiresApproachCircles
{
[SettingSource("Default Slider Body Display", "Body of the slider will have the same looks as without Traceable.")]
public Bindable<bool> DefaultSliderBodyDisplay { get; } = new BindableBool();

public override string Name => "Traceable";
public override string Acronym => "TC";
public override ModType Type => ModType.Fun;
Expand Down Expand Up @@ -72,6 +77,9 @@ private void applyCirclePieceState(DrawableOsuHitObject hitObject, IDrawable? hi

private void applySliderState(DrawableSlider slider)
{
if (DefaultSliderBodyDisplay.Value)
return;

((PlaySliderBody)slider.Body.Drawable).AccentColour = slider.AccentColour.Value.Opacity(0);
((PlaySliderBody)slider.Body.Drawable).BorderColour = slider.AccentColour.Value;
}
Expand Down

0 comments on commit 1695bd8

Please sign in to comment.