diff --git a/osu.Game/Overlays/BeatmapSet/Scores/ScoreTable.cs b/osu.Game/Overlays/BeatmapSet/Scores/ScoreTable.cs
index 58f5f02956..f6723839b2 100644
--- a/osu.Game/Overlays/BeatmapSet/Scores/ScoreTable.cs
+++ b/osu.Game/Overlays/BeatmapSet/Scores/ScoreTable.cs
@@ -63,7 +63,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
return;
for (int i = 0; i < value.Count; i++)
- backgroundFlow.Add(new ScoreTableRowBackground(i));
+ backgroundFlow.Add(new ScoreTableRowBackground(i, value[i]));
Columns = createHeaders(value[0]);
Content = value.Select((s, i) => createContent(i, s)).ToArray().ToRectangular();
diff --git a/osu.Game/Overlays/BeatmapSet/Scores/ScoreTableRowBackground.cs b/osu.Game/Overlays/BeatmapSet/Scores/ScoreTableRowBackground.cs
index d820f4d89d..724a7f8b55 100644
--- a/osu.Game/Overlays/BeatmapSet/Scores/ScoreTableRowBackground.cs
+++ b/osu.Game/Overlays/BeatmapSet/Scores/ScoreTableRowBackground.cs
@@ -7,6 +7,8 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
+using osu.Game.Online.API;
+using osu.Game.Scoring;
namespace osu.Game.Overlays.BeatmapSet.Scores
{
@@ -17,8 +19,14 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
private readonly Box hoveredBackground;
private readonly Box background;
- public ScoreTableRowBackground(int index)
+ private readonly int index;
+ private readonly ScoreInfo score;
+
+ public ScoreTableRowBackground(int index, ScoreInfo score)
{
+ this.index = index;
+ this.score = score;
+
RelativeSizeAxes = Axes.X;
Height = 25;
@@ -37,16 +45,21 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
Alpha = 0,
},
};
-
- if (index % 2 != 0)
- background.Alpha = 0;
}
[BackgroundDependencyLoader]
- private void load(OsuColour colours)
+ private void load(OsuColour colours, IAPIProvider api)
{
- hoveredBackground.Colour = colours.Gray4;
- background.Colour = colours.Gray3;
+ var isOwnScore = api.LocalUser.Value.Id == score.UserID;
+
+ if (isOwnScore)
+ background.Colour = colours.GreenDarker;
+ else if (index % 2 == 0)
+ background.Colour = colours.Gray3;
+ else
+ background.Alpha = 0;
+
+ hoveredBackground.Colour = isOwnScore ? colours.GreenDark : colours.Gray4;
}
protected override bool OnHover(HoverEvent e)
diff --git a/osu.Game/Overlays/Mods/ModButton.cs b/osu.Game/Overlays/Mods/ModButton.cs
index c6b4787ff1..69a4a4181a 100644
--- a/osu.Game/Overlays/Mods/ModButton.cs
+++ b/osu.Game/Overlays/Mods/ModButton.cs
@@ -167,10 +167,6 @@ namespace osu.Game.Overlays.Mods
{
switch (e.Button)
{
- case MouseButton.Left:
- SelectNext(1);
- break;
-
case MouseButton.Right:
SelectNext(-1);
break;
@@ -180,6 +176,13 @@ namespace osu.Game.Overlays.Mods
return true;
}
+ protected override bool OnClick(ClickEvent e)
+ {
+ SelectNext(1);
+
+ return true;
+ }
+
///
/// Select the next available mod in a specified direction.
///
diff --git a/osu.Game/Overlays/SettingsSubPanel.cs b/osu.Game/Overlays/SettingsSubPanel.cs
index 5000156e97..1fa233d9d4 100644
--- a/osu.Game/Overlays/SettingsSubPanel.cs
+++ b/osu.Game/Overlays/SettingsSubPanel.cs
@@ -3,16 +3,14 @@
using osu.Framework.Allocation;
using osu.Framework.Graphics;
+using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
-using osu.Framework.Input.Bindings;
-using osu.Framework.Input.Events;
using osu.Game.Graphics;
-using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
-using osu.Game.Input.Bindings;
+using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays.Settings;
-using osu.Game.Screens.Ranking;
using osuTK;
+using osuTK.Graphics;
namespace osu.Game.Overlays
{
@@ -36,21 +34,21 @@ namespace osu.Game.Overlays
protected override bool DimMainContent => false; // dimming is handled by main overlay
- private class BackButton : OsuClickableContainer, IKeyBindingHandler
+ private class BackButton : OsuButton
{
- private AspectContainer aspect;
-
[BackgroundDependencyLoader]
private void load()
{
Size = new Vector2(Sidebar.DEFAULT_WIDTH);
- Children = new Drawable[]
+
+ BackgroundColour = Color4.Black;
+
+ AddRange(new Drawable[]
{
- aspect = new AspectContainer
+ new Container
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
- RelativeSizeAxes = Axes.Y,
Children = new Drawable[]
{
new SpriteIcon
@@ -71,34 +69,8 @@ namespace osu.Game.Overlays
},
}
}
- };
+ });
}
-
- protected override bool OnMouseDown(MouseDownEvent e)
- {
- aspect.ScaleTo(0.75f, 2000, Easing.OutQuint);
- return base.OnMouseDown(e);
- }
-
- protected override bool OnMouseUp(MouseUpEvent e)
- {
- aspect.ScaleTo(1, 1000, Easing.OutElastic);
- return base.OnMouseUp(e);
- }
-
- public bool OnPressed(GlobalAction action)
- {
- switch (action)
- {
- case GlobalAction.Back:
- Click();
- return true;
- }
-
- return false;
- }
-
- public bool OnReleased(GlobalAction action) => false;
}
}
}