This repository has been archived by the owner on Jun 11, 2023. It is now read-only.
forked from ppy/osu
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a330842
commit 0478f7b
Showing
12 changed files
with
399 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Framework.Allocation; | ||
using osu.Framework.Graphics; | ||
using osu.Framework.Graphics.Containers; | ||
using osu.Framework.Graphics.Shapes; | ||
using osu.Framework.Input.Events; | ||
using osuTK.Graphics; | ||
|
||
namespace osu.Game.Overlays.Profile.Sections | ||
{ | ||
public class ProfileItemContainer : Container | ||
{ | ||
private const int hover_duration = 200; | ||
|
||
protected override Container<Drawable> Content => content; | ||
|
||
private Color4 idleColour; | ||
private Color4 hoverColour; | ||
|
||
private readonly Box background; | ||
private readonly Container content; | ||
|
||
public ProfileItemContainer() | ||
{ | ||
RelativeSizeAxes = Axes.Both; | ||
Masking = true; | ||
CornerRadius = 6; | ||
|
||
AddRangeInternal(new Drawable[] | ||
{ | ||
background = new Box | ||
{ | ||
RelativeSizeAxes = Axes.Both, | ||
}, | ||
content = new Container | ||
{ | ||
RelativeSizeAxes = Axes.Both, | ||
} | ||
}); | ||
} | ||
|
||
[BackgroundDependencyLoader] | ||
private void load(OverlayColourProvider colourProvider) | ||
{ | ||
background.Colour = idleColour = colourProvider.Background4; | ||
hoverColour = colourProvider.Background3; | ||
} | ||
|
||
protected override bool OnHover(HoverEvent e) | ||
{ | ||
background.FadeColour(hoverColour, hover_duration, Easing.OutQuint); | ||
return base.OnHover(e); | ||
} | ||
|
||
protected override void OnHoverLost(HoverLostEvent e) | ||
{ | ||
base.OnHoverLost(e); | ||
background.FadeColour(idleColour, hover_duration, Easing.OutQuint); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 0 additions & 47 deletions
47
osu.Game/Overlays/Profile/Sections/Ranks/DrawablePerformanceScore.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.