Skip to content

Commit

Permalink
Fix too intensive flash on user panels
Browse files Browse the repository at this point in the history
  • Loading branch information
Feodor0090 committed Jan 24, 2023
1 parent 637d69d commit 6a50606
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions osu.Game.Rulesets.OvkTab/UI/Components/UserPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events;
using osu.Framework.Localisation;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Graphics;
Expand Down Expand Up @@ -31,10 +32,11 @@ public UserPanel(SimpleVkUser user)
[BackgroundDependencyLoader]
private void load(OsuColour colour)
{
kiai = colour.PinkLight;
Add(bg = new Box
{
Colour = Colour4.White,
Alpha = 0.3f,
Alpha = 0.1f,
RelativeSizeAxes = Axes.Both,
});

Expand All @@ -60,9 +62,20 @@ private void load(OsuColour colour)
}, Add);
}

private readonly Colour4 kiai = Colour4.FromHex("BBB");
private Colour4 kiai;
private readonly Colour4 normal = Colour4.FromHex("EEE");

protected override bool OnHover(HoverEvent e)
{
bg.FadeTo(0.2f, 200, Easing.OutQuint);
return false;
}

protected override void OnHoverLost(HoverLostEvent e)
{
bg.FadeTo(0.1f, 500);
}

protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, ChannelAmplitudes amplitudes)
{
base.OnNewBeat(beatIndex, timingPoint, effectPoint, amplitudes);
Expand Down

0 comments on commit 6a50606

Please sign in to comment.