mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 14:32:55 +08:00
Adjust visuals slightly.
This commit is contained in:
parent
1071645dca
commit
b0f1851e88
@ -30,7 +30,6 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
if (value == progress) return;
|
if (value == progress) return;
|
||||||
progress = value;
|
progress = value;
|
||||||
|
|
||||||
redrawProgress();
|
redrawProgress();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -45,7 +44,7 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
if (value == values) return;
|
if (value == values) return;
|
||||||
values = value;
|
values = value;
|
||||||
recreateGraph();
|
layout.Invalidate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,7 +56,6 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
if (value == fillColour) return;
|
if (value == fillColour) return;
|
||||||
fillColour = value;
|
fillColour = value;
|
||||||
|
|
||||||
redrawFilled();
|
redrawFilled();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -65,7 +63,6 @@ namespace osu.Game.Screens.Play
|
|||||||
public SquareGraph()
|
public SquareGraph()
|
||||||
{
|
{
|
||||||
CacheDrawnFrameBuffer = true;
|
CacheDrawnFrameBuffer = true;
|
||||||
PixelSnapping = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Cached layout = new Cached();
|
private Cached layout = new Cached();
|
||||||
@ -89,10 +86,7 @@ namespace osu.Game.Screens.Play
|
|||||||
private void redrawProgress()
|
private void redrawProgress()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < columns.Length; i++)
|
for (int i = 0; i < columns.Length; i++)
|
||||||
{
|
|
||||||
columns[i].State = i <= progress ? ColumnState.Lit : ColumnState.Dimmed;
|
columns[i].State = i <= progress ? ColumnState.Lit : ColumnState.Dimmed;
|
||||||
}
|
|
||||||
|
|
||||||
ForceRedraw();
|
ForceRedraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,9 +96,8 @@ namespace osu.Game.Screens.Play
|
|||||||
private void redrawFilled()
|
private void redrawFilled()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < ColumnCount; i++)
|
for (int i = 0; i < ColumnCount; i++)
|
||||||
{
|
|
||||||
columns[i].Filled = calculatedValues.ElementAtOrDefault(i);
|
columns[i].Filled = calculatedValues.ElementAtOrDefault(i);
|
||||||
}
|
ForceRedraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -142,8 +135,9 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
for (float x = 0; x < DrawWidth; x += Column.WIDTH)
|
for (float x = 0; x < DrawWidth; x += Column.WIDTH)
|
||||||
{
|
{
|
||||||
newColumns.Add(new Column(fillColour)
|
newColumns.Add(new Column
|
||||||
{
|
{
|
||||||
|
LitColour = fillColour,
|
||||||
Anchor = Anchor.BottomLeft,
|
Anchor = Anchor.BottomLeft,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
Height = DrawHeight,
|
Height = DrawHeight,
|
||||||
@ -162,9 +156,9 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
public class Column : Container, IStateful<ColumnState>
|
public class Column : Container, IStateful<ColumnState>
|
||||||
{
|
{
|
||||||
private readonly Color4 emptyColour = Color4.White.Opacity(100);
|
protected readonly Color4 EmptyColour = Color4.White.Opacity(20);
|
||||||
private readonly Color4 litColour;
|
public Color4 LitColour = Color4.LightBlue;
|
||||||
private readonly Color4 dimmedColour = Color4.White.Opacity(175);
|
protected readonly Color4 DimmedColour = Color4.White.Opacity(140);
|
||||||
|
|
||||||
private float cubeCount => DrawHeight / WIDTH;
|
private float cubeCount => DrawHeight / WIDTH;
|
||||||
private const float cube_size = 4;
|
private const float cube_size = 4;
|
||||||
@ -195,14 +189,14 @@ namespace osu.Game.Screens.Play
|
|||||||
if (value == state) return;
|
if (value == state) return;
|
||||||
state = value;
|
state = value;
|
||||||
|
|
||||||
fillActive();
|
if (IsLoaded)
|
||||||
|
fillActive();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Column(Color4 litColour)
|
public Column()
|
||||||
{
|
{
|
||||||
Width = WIDTH;
|
Width = WIDTH;
|
||||||
this.litColour = litColour;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
@ -211,7 +205,6 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
drawableRows.Add(new Box
|
drawableRows.Add(new Box
|
||||||
{
|
{
|
||||||
EdgeSmoothness = new Vector2(padding / 4),
|
|
||||||
Size = new Vector2(cube_size),
|
Size = new Vector2(cube_size),
|
||||||
Position = new Vector2(0, r * WIDTH + padding),
|
Position = new Vector2(0, r * WIDTH + padding),
|
||||||
});
|
});
|
||||||
@ -227,12 +220,12 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private void fillActive()
|
private void fillActive()
|
||||||
{
|
{
|
||||||
Color4 colour = State == ColumnState.Lit ? litColour : dimmedColour;
|
Color4 colour = State == ColumnState.Lit ? LitColour : DimmedColour;
|
||||||
|
|
||||||
int countFilled = (int)MathHelper.Clamp(filled * drawableRows.Count, 0, drawableRows.Count);
|
int countFilled = (int)MathHelper.Clamp(filled * drawableRows.Count, 0, drawableRows.Count);
|
||||||
|
|
||||||
for (int i = 0; i < drawableRows.Count; i++)
|
for (int i = 0; i < drawableRows.Count; i++)
|
||||||
drawableRows[i].Colour = i < countFilled ? colour : emptyColour;
|
drawableRows[i].Colour = i < countFilled ? colour : EmptyColour;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user