Added back current work

This commit is contained in:
DrabWeb 2017-02-03 15:22:02 -04:00
parent 3f9b5ee6cb
commit 0d8815bd37
7 changed files with 59 additions and 34 deletions

View File

@ -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
});
}
}
}

View File

@ -188,6 +188,7 @@
<Compile Include="Platform\TestStorage.cs" /> <Compile Include="Platform\TestStorage.cs" />
<Compile Include="Tests\TestCaseOptions.cs" /> <Compile Include="Tests\TestCaseOptions.cs" />
<Compile Include="Tests\TestCasePauseOverlay.cs" /> <Compile Include="Tests\TestCasePauseOverlay.cs" />
<Compile Include="Tests\TestCaseSongProgressBar.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<ItemGroup /> <ItemGroup />

View File

@ -6,12 +6,16 @@ using osu.Framework.Graphics.Containers;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Framework.Graphics.Primitives; 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 const int bar_height = 5;
private Color4 glowColour = new Color4(221, 255, 255, 150); 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 Container fill;
private WorkingBeatmap current; private WorkingBeatmap current;
@ -32,22 +36,22 @@ namespace osu.Game.Overlays.Pause
} }
} }
public PauseProgressBar() public SongProgressBar()
{ {
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
Height = 60; Height = bar_height + graph_height + handle_height;
Children = new Drawable[] Children = new Drawable[]
{ {
new PauseProgressGraph new SongProgressGraph
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Origin = Anchor.BottomCentre, Origin = Anchor.BottomCentre,
Anchor = Anchor.BottomCentre, Anchor = Anchor.BottomCentre,
Height = 35, Height = graph_height,
Margin = new MarginPadding Margin = new MarginPadding
{ {
Bottom = 5 Bottom = bar_height
} }
}, },
new Container new Container
@ -55,7 +59,7 @@ namespace osu.Game.Overlays.Pause
Origin = Anchor.BottomRight, Origin = Anchor.BottomRight,
Anchor = Anchor.BottomRight, Anchor = Anchor.BottomRight,
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Height = 5, Height = bar_height,
Children = new Drawable[] Children = new Drawable[]
{ {
new Box new Box
@ -72,7 +76,7 @@ namespace osu.Game.Overlays.Pause
Origin = Anchor.BottomLeft, Origin = Anchor.BottomLeft,
Anchor = Anchor.BottomLeft, Anchor = Anchor.BottomLeft,
Width = 0, Width = 0,
Height = 60, Height = bar_height + graph_height + handle_height,
Children = new Drawable[] Children = new Drawable[]
{ {
new Container new Container
@ -88,12 +92,12 @@ namespace osu.Game.Overlays.Pause
Origin = Anchor.BottomLeft, Origin = Anchor.BottomLeft,
Anchor = Anchor.BottomLeft, Anchor = Anchor.BottomLeft,
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Height = 5, Height = bar_height,
Masking = true, Masking = true,
EdgeEffect = new EdgeEffect EdgeEffect = new EdgeEffect
{ {
Type = EdgeEffectType.Glow, Type = EdgeEffectType.Glow,
Colour = glowColour, Colour = glow_colour,
Radius = 5 Radius = 5
}, },
Children = new Drawable[] Children = new Drawable[]
@ -101,7 +105,7 @@ namespace osu.Game.Overlays.Pause
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = fillColour Colour = fill_colour
} }
} }
} }
@ -112,7 +116,7 @@ namespace osu.Game.Overlays.Pause
Origin = Anchor.BottomRight, Origin = Anchor.BottomRight,
Anchor = Anchor.BottomRight, Anchor = Anchor.BottomRight,
Width = 2, Width = 2,
Height = 35, Height = bar_height + graph_height ,
Children = new Drawable[] Children = new Drawable[]
{ {
new Box new Box
@ -124,8 +128,8 @@ namespace osu.Game.Overlays.Pause
{ {
Origin = Anchor.BottomCentre, Origin = Anchor.BottomCentre,
Anchor = Anchor.TopCentre, Anchor = Anchor.TopCentre,
Width = 14, Width = handle_width,
Height = 25, Height = handle_height,
CornerRadius = 5, CornerRadius = 5,
Masking = true, Masking = true,
Children = new Drawable[] Children = new Drawable[]

View File

@ -0,0 +1,9 @@
using osu.Framework.Graphics.Containers;
namespace osu.Game.Graphics.UserInterface
{
public class SongProgressGraph : Container
{
// TODO: Implement the song progress graph
}
}

View File

@ -186,12 +186,6 @@ namespace osu.Game.Overlays.Pause
Anchor = Anchor.TopCentre Anchor = Anchor.TopCentre
} }
} }
},
new PauseProgressBar
{
Origin = Anchor.BottomCentre,
Anchor = Anchor.BottomCentre,
Width = 1f
} }
}; };

View File

@ -1,9 +0,0 @@
using osu.Framework.Graphics.Containers;
namespace osu.Game.Overlays.Pause
{
public class PauseProgressGraph : Container
{
// TODO: Implement the pause progress graph
}
}

View File

@ -247,11 +247,11 @@
<Compile Include="Screens\Select\Footer.cs" /> <Compile Include="Screens\Select\Footer.cs" />
<Compile Include="Overlays\Pause\PauseButton.cs" /> <Compile Include="Overlays\Pause\PauseButton.cs" />
<Compile Include="Overlays\Pause\PauseOverlay.cs" /> <Compile Include="Overlays\Pause\PauseOverlay.cs" />
<Compile Include="Overlays\Pause\PauseProgressBar.cs" />
<Compile Include="Overlays\Pause\PauseProgressGraph.cs" />
<Compile Include="Overlays\Pause\ResumeButton.cs" /> <Compile Include="Overlays\Pause\ResumeButton.cs" />
<Compile Include="Overlays\Pause\RetryButton.cs" /> <Compile Include="Overlays\Pause\RetryButton.cs" />
<Compile Include="Overlays\Pause\QuitButton.cs" /> <Compile Include="Overlays\Pause\QuitButton.cs" />
<Compile Include="Graphics\UserInterface\SongProgressBar.cs" />
<Compile Include="Graphics\UserInterface\SongProgressGraph.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="$(SolutionDir)\osu-framework\osu.Framework\osu.Framework.csproj"> <ProjectReference Include="$(SolutionDir)\osu-framework\osu.Framework\osu.Framework.csproj">