diff --git a/osu.Desktop.VisualTests/Tests/TestCaseSongProgressBar.cs b/osu.Desktop.VisualTests/Tests/TestCaseSongProgressBar.cs
new file mode 100644
index 0000000000..479dac895e
--- /dev/null
+++ b/osu.Desktop.VisualTests/Tests/TestCaseSongProgressBar.cs
@@ -0,0 +1,26 @@
+using System;
+using osu.Framework.Graphics;
+using osu.Framework.GameModes.Testing;
+using osu.Game.Graphics.UserInterface;
+
+namespace osu.Desktop.VisualTests
+{
+ public class TestCaseSongProgressBar : TestCase
+ {
+ public override string Name => @"SongProgressBar";
+
+ public override string Description => @"Tests the song progress bar";
+
+ public override void Reset()
+ {
+ base.Reset();
+
+ Add(new SongProgressBar
+ {
+ Anchor = Anchor.BottomCentre,
+ Origin = Anchor.BottomCentre,
+ RelativeSizeAxes = Axes.X
+ });
+ }
+ }
+}
diff --git a/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj b/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj
index 69df007013..1619c18e4c 100644
--- a/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj
+++ b/osu.Desktop.VisualTests/osu.Desktop.VisualTests.csproj
@@ -188,6 +188,7 @@
+
diff --git a/osu.Game/Overlays/Pause/PauseProgressBar.cs b/osu.Game/Graphics/UserInterface/SongProgressBar.cs
similarity index 80%
rename from osu.Game/Overlays/Pause/PauseProgressBar.cs
rename to osu.Game/Graphics/UserInterface/SongProgressBar.cs
index 28824cb7ea..ec208ad0de 100644
--- a/osu.Game/Overlays/Pause/PauseProgressBar.cs
+++ b/osu.Game/Graphics/UserInterface/SongProgressBar.cs
@@ -6,12 +6,16 @@ using osu.Framework.Graphics.Containers;
using osu.Game.Beatmaps;
using osu.Framework.Graphics.Primitives;
-namespace osu.Game.Overlays.Pause
+namespace osu.Game.Graphics.UserInterface
{
- public class PauseProgressBar : Container
+ public class SongProgressBar : Container
{
- private Color4 fillColour = new Color4(221, 255, 255, 255);
- private Color4 glowColour = new Color4(221, 255, 255, 150);
+ private const int bar_height = 5;
+ private const int graph_height = 40;
+ private const int handle_height = 25;
+ private const int handle_width = 14;
+ private Color4 fill_colour = new Color4(221, 255, 255, 255);
+ private Color4 glow_colour = new Color4(221, 255, 255, 150);
private Container fill;
private WorkingBeatmap current;
@@ -32,22 +36,22 @@ namespace osu.Game.Overlays.Pause
}
}
- public PauseProgressBar()
+ public SongProgressBar()
{
RelativeSizeAxes = Axes.X;
- Height = 60;
+ Height = bar_height + graph_height + handle_height;
Children = new Drawable[]
{
- new PauseProgressGraph
+ new SongProgressGraph
{
RelativeSizeAxes = Axes.X,
Origin = Anchor.BottomCentre,
Anchor = Anchor.BottomCentre,
- Height = 35,
+ Height = graph_height,
Margin = new MarginPadding
{
- Bottom = 5
+ Bottom = bar_height
}
},
new Container
@@ -55,7 +59,7 @@ namespace osu.Game.Overlays.Pause
Origin = Anchor.BottomRight,
Anchor = Anchor.BottomRight,
RelativeSizeAxes = Axes.X,
- Height = 5,
+ Height = bar_height,
Children = new Drawable[]
{
new Box
@@ -72,7 +76,7 @@ namespace osu.Game.Overlays.Pause
Origin = Anchor.BottomLeft,
Anchor = Anchor.BottomLeft,
Width = 0,
- Height = 60,
+ Height = bar_height + graph_height + handle_height,
Children = new Drawable[]
{
new Container
@@ -88,12 +92,12 @@ namespace osu.Game.Overlays.Pause
Origin = Anchor.BottomLeft,
Anchor = Anchor.BottomLeft,
RelativeSizeAxes = Axes.X,
- Height = 5,
+ Height = bar_height,
Masking = true,
EdgeEffect = new EdgeEffect
{
Type = EdgeEffectType.Glow,
- Colour = glowColour,
+ Colour = glow_colour,
Radius = 5
},
Children = new Drawable[]
@@ -101,7 +105,7 @@ namespace osu.Game.Overlays.Pause
new Box
{
RelativeSizeAxes = Axes.Both,
- Colour = fillColour
+ Colour = fill_colour
}
}
}
@@ -112,7 +116,7 @@ namespace osu.Game.Overlays.Pause
Origin = Anchor.BottomRight,
Anchor = Anchor.BottomRight,
Width = 2,
- Height = 35,
+ Height = bar_height + graph_height ,
Children = new Drawable[]
{
new Box
@@ -124,8 +128,8 @@ namespace osu.Game.Overlays.Pause
{
Origin = Anchor.BottomCentre,
Anchor = Anchor.TopCentre,
- Width = 14,
- Height = 25,
+ Width = handle_width,
+ Height = handle_height,
CornerRadius = 5,
Masking = true,
Children = new Drawable[]
diff --git a/osu.Game/Graphics/UserInterface/SongProgressGraph.cs b/osu.Game/Graphics/UserInterface/SongProgressGraph.cs
new file mode 100644
index 0000000000..4af7b8e857
--- /dev/null
+++ b/osu.Game/Graphics/UserInterface/SongProgressGraph.cs
@@ -0,0 +1,9 @@
+using osu.Framework.Graphics.Containers;
+
+namespace osu.Game.Graphics.UserInterface
+{
+ public class SongProgressGraph : Container
+ {
+ // TODO: Implement the song progress graph
+ }
+}
diff --git a/osu.Game/Overlays/Pause/PauseOverlay.cs b/osu.Game/Overlays/Pause/PauseOverlay.cs
index 3cf514b7c8..3d1e52bb20 100644
--- a/osu.Game/Overlays/Pause/PauseOverlay.cs
+++ b/osu.Game/Overlays/Pause/PauseOverlay.cs
@@ -186,12 +186,6 @@ namespace osu.Game.Overlays.Pause
Anchor = Anchor.TopCentre
}
}
- },
- new PauseProgressBar
- {
- Origin = Anchor.BottomCentre,
- Anchor = Anchor.BottomCentre,
- Width = 1f
}
};
diff --git a/osu.Game/Overlays/Pause/PauseProgressGraph.cs b/osu.Game/Overlays/Pause/PauseProgressGraph.cs
deleted file mode 100644
index fab9f37923..0000000000
--- a/osu.Game/Overlays/Pause/PauseProgressGraph.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using osu.Framework.Graphics.Containers;
-
-namespace osu.Game.Overlays.Pause
-{
- public class PauseProgressGraph : Container
- {
- // TODO: Implement the pause progress graph
- }
-}
diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj
index f8fa2c951a..2b26c1ee50 100644
--- a/osu.Game/osu.Game.csproj
+++ b/osu.Game/osu.Game.csproj
@@ -247,11 +247,11 @@
-
-
+
+