mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 02:23:06 +08:00
Naming standardisation and enforcing.
This commit is contained in:
parent
50bd80cb0c
commit
6b011a50d2
@ -1 +1 @@
|
|||||||
Subproject commit 66af3bcb3cb6dc3e38f94553bd2c1bb81746eabc
|
Subproject commit e7a6cdbc568aaa3be371bfeae9cdb5f160f1477b
|
@ -13,7 +13,7 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
public override string Name => @"Music Controller";
|
public override string Name => @"Music Controller";
|
||||||
public override string Description => @"Tests music controller ui.";
|
public override string Description => @"Tests music controller ui.";
|
||||||
|
|
||||||
protected MusicController mc;
|
private MusicController mc;
|
||||||
|
|
||||||
public TestCaseMusicController()
|
public TestCaseMusicController()
|
||||||
{
|
{
|
||||||
|
@ -13,8 +13,8 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
private Vector2[] subdivisionBuffer1;
|
private Vector2[] subdivisionBuffer1;
|
||||||
private Vector2[] subdivisionBuffer2;
|
private Vector2[] subdivisionBuffer2;
|
||||||
|
|
||||||
private const float TOLERANCE = 0.25f;
|
private const float tolerance = 0.25f;
|
||||||
private const float TOLERANCE_SQ = TOLERANCE * TOLERANCE;
|
private const float tolerance_sq = tolerance * tolerance;
|
||||||
|
|
||||||
public BezierApproximator(List<Vector2> controlPoints)
|
public BezierApproximator(List<Vector2> controlPoints)
|
||||||
{
|
{
|
||||||
@ -33,10 +33,10 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="controlPoints">The control points to check for flatness.</param>
|
/// <param name="controlPoints">The control points to check for flatness.</param>
|
||||||
/// <returns>Whether the control points are flat enough.</returns>
|
/// <returns>Whether the control points are flat enough.</returns>
|
||||||
private static bool IsFlatEnough(Vector2[] controlPoints)
|
private static bool isFlatEnough(Vector2[] controlPoints)
|
||||||
{
|
{
|
||||||
for (int i = 1; i < controlPoints.Length - 1; i++)
|
for (int i = 1; i < controlPoints.Length - 1; i++)
|
||||||
if ((controlPoints[i - 1] - 2 * controlPoints[i] + controlPoints[i + 1]).LengthSquared > TOLERANCE_SQ * 4)
|
if ((controlPoints[i - 1] - 2 * controlPoints[i] + controlPoints[i + 1]).LengthSquared > tolerance_sq * 4)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -50,7 +50,7 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
/// <param name="controlPoints">The control points to split.</param>
|
/// <param name="controlPoints">The control points to split.</param>
|
||||||
/// <param name="l">Output: The control points corresponding to the left half of the curve.</param>
|
/// <param name="l">Output: The control points corresponding to the left half of the curve.</param>
|
||||||
/// <param name="r">Output: The control points corresponding to the right half of the curve.</param>
|
/// <param name="r">Output: The control points corresponding to the right half of the curve.</param>
|
||||||
private void Subdivide(Vector2[] controlPoints, Vector2[] l, Vector2[] r)
|
private void subdivide(Vector2[] controlPoints, Vector2[] l, Vector2[] r)
|
||||||
{
|
{
|
||||||
Vector2[] midpoints = subdivisionBuffer1;
|
Vector2[] midpoints = subdivisionBuffer1;
|
||||||
|
|
||||||
@ -73,12 +73,12 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="controlPoints">The control points describing the bezier curve to be approximated.</param>
|
/// <param name="controlPoints">The control points describing the bezier curve to be approximated.</param>
|
||||||
/// <param name="output">The points representing the resulting piecewise-linear approximation.</param>
|
/// <param name="output">The points representing the resulting piecewise-linear approximation.</param>
|
||||||
private void Approximate(Vector2[] controlPoints, List<Vector2> output)
|
private void approximate(Vector2[] controlPoints, List<Vector2> output)
|
||||||
{
|
{
|
||||||
Vector2[] l = subdivisionBuffer2;
|
Vector2[] l = subdivisionBuffer2;
|
||||||
Vector2[] r = subdivisionBuffer1;
|
Vector2[] r = subdivisionBuffer1;
|
||||||
|
|
||||||
Subdivide(controlPoints, l, r);
|
subdivide(controlPoints, l, r);
|
||||||
|
|
||||||
for (int i = 0; i < count - 1; ++i)
|
for (int i = 0; i < count - 1; ++i)
|
||||||
l[count + i] = r[i + 1];
|
l[count + i] = r[i + 1];
|
||||||
@ -119,13 +119,13 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
while (toFlatten.Count > 0)
|
while (toFlatten.Count > 0)
|
||||||
{
|
{
|
||||||
Vector2[] parent = toFlatten.Pop();
|
Vector2[] parent = toFlatten.Pop();
|
||||||
if (IsFlatEnough(parent))
|
if (isFlatEnough(parent))
|
||||||
{
|
{
|
||||||
// If the control points we currently operate on are sufficiently "flat", we use
|
// If the control points we currently operate on are sufficiently "flat", we use
|
||||||
// an extension to De Casteljau's algorithm to obtain a piecewise-linear approximation
|
// an extension to De Casteljau's algorithm to obtain a piecewise-linear approximation
|
||||||
// of the bezier curve represented by our control points, consisting of the same amount
|
// of the bezier curve represented by our control points, consisting of the same amount
|
||||||
// of points as there are control points.
|
// of points as there are control points.
|
||||||
Approximate(parent, output);
|
approximate(parent, output);
|
||||||
freeBuffers.Push(parent);
|
freeBuffers.Push(parent);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -133,7 +133,7 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
// If we do not yet have a sufficiently "flat" (in other words, detailed) approximation we keep
|
// If we do not yet have a sufficiently "flat" (in other words, detailed) approximation we keep
|
||||||
// subdividing the curve we are currently operating on.
|
// subdividing the curve we are currently operating on.
|
||||||
Vector2[] rightChild = freeBuffers.Count > 0 ? freeBuffers.Pop() : new Vector2[count];
|
Vector2[] rightChild = freeBuffers.Count > 0 ? freeBuffers.Pop() : new Vector2[count];
|
||||||
Subdivide(parent, leftChild, rightChild);
|
subdivide(parent, leftChild, rightChild);
|
||||||
|
|
||||||
// We re-use the buffer of the parent for one of the children, so that we save one allocation per iteration.
|
// We re-use the buffer of the parent for one of the children, so that we save one allocation per iteration.
|
||||||
for (int i = 0; i < count; ++i)
|
for (int i = 0; i < count; ++i)
|
||||||
|
@ -10,19 +10,19 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
{
|
{
|
||||||
public class CircularArcApproximator
|
public class CircularArcApproximator
|
||||||
{
|
{
|
||||||
private Vector2 A;
|
private Vector2 a;
|
||||||
private Vector2 B;
|
private Vector2 b;
|
||||||
private Vector2 C;
|
private Vector2 c;
|
||||||
|
|
||||||
private int amountPoints;
|
private int amountPoints;
|
||||||
|
|
||||||
private const float TOLERANCE = 0.1f;
|
private const float tolerance = 0.1f;
|
||||||
|
|
||||||
public CircularArcApproximator(Vector2 A, Vector2 B, Vector2 C)
|
public CircularArcApproximator(Vector2 a, Vector2 b, Vector2 c)
|
||||||
{
|
{
|
||||||
this.A = A;
|
this.a = a;
|
||||||
this.B = B;
|
this.b = b;
|
||||||
this.C = C;
|
this.c = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -31,9 +31,9 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
/// <returns>A list of vectors representing the piecewise-linear approximation.</returns>
|
/// <returns>A list of vectors representing the piecewise-linear approximation.</returns>
|
||||||
public List<Vector2> CreateArc()
|
public List<Vector2> CreateArc()
|
||||||
{
|
{
|
||||||
float aSq = (B - C).LengthSquared;
|
float aSq = (b - c).LengthSquared;
|
||||||
float bSq = (A - C).LengthSquared;
|
float bSq = (a - c).LengthSquared;
|
||||||
float cSq = (A - B).LengthSquared;
|
float cSq = (a - b).LengthSquared;
|
||||||
|
|
||||||
// If we have a degenerate triangle where a side-length is almost zero, then give up and fall
|
// If we have a degenerate triangle where a side-length is almost zero, then give up and fall
|
||||||
// back to a more numerically stable method.
|
// back to a more numerically stable method.
|
||||||
@ -51,9 +51,9 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
if (Precision.AlmostEquals(sum, 0))
|
if (Precision.AlmostEquals(sum, 0))
|
||||||
return new List<Vector2>();
|
return new List<Vector2>();
|
||||||
|
|
||||||
Vector2 centre = (s * A + t * B + u * C) / sum;
|
Vector2 centre = (s * a + t * b + u * c) / sum;
|
||||||
Vector2 dA = A - centre;
|
Vector2 dA = a - centre;
|
||||||
Vector2 dC = C - centre;
|
Vector2 dC = c - centre;
|
||||||
|
|
||||||
float r = dA.Length;
|
float r = dA.Length;
|
||||||
|
|
||||||
@ -68,9 +68,9 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
|
|
||||||
// Decide in which direction to draw the circle, depending on which side of
|
// Decide in which direction to draw the circle, depending on which side of
|
||||||
// AC B lies.
|
// AC B lies.
|
||||||
Vector2 orthoAC = C - A;
|
Vector2 orthoAtoC = c - a;
|
||||||
orthoAC = new Vector2(orthoAC.Y, -orthoAC.X);
|
orthoAtoC = new Vector2(orthoAtoC.Y, -orthoAtoC.X);
|
||||||
if (Vector2.Dot(orthoAC, B - A) < 0)
|
if (Vector2.Dot(orthoAtoC, b - a) < 0)
|
||||||
{
|
{
|
||||||
dir = -dir;
|
dir = -dir;
|
||||||
thetaRange = 2 * Math.PI - thetaRange;
|
thetaRange = 2 * Math.PI - thetaRange;
|
||||||
@ -79,12 +79,12 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
// We select the amount of points for the approximation by requiring the discrete curvature
|
// We select the amount of points for the approximation by requiring the discrete curvature
|
||||||
// to be smaller than the provided tolerance. The exact angle required to meet the tolerance
|
// to be smaller than the provided tolerance. The exact angle required to meet the tolerance
|
||||||
// is: 2 * Math.Acos(1 - TOLERANCE / r)
|
// is: 2 * Math.Acos(1 - TOLERANCE / r)
|
||||||
if (2 * r <= TOLERANCE)
|
if (2 * r <= tolerance)
|
||||||
// This special case is required for extremely short sliders where the radius is smaller than
|
// This special case is required for extremely short sliders where the radius is smaller than
|
||||||
// the tolerance. This is a pathological rather than a realistic case.
|
// the tolerance. This is a pathological rather than a realistic case.
|
||||||
amountPoints = 2;
|
amountPoints = 2;
|
||||||
else
|
else
|
||||||
amountPoints = Math.Max(2, (int)Math.Ceiling(thetaRange / (2 * Math.Acos(1 - TOLERANCE / r))));
|
amountPoints = Math.Max(2, (int)Math.Ceiling(thetaRange / (2 * Math.Acos(1 - tolerance / r))));
|
||||||
|
|
||||||
List<Vector2> output = new List<Vector2>(amountPoints);
|
List<Vector2> output = new List<Vector2>(amountPoints);
|
||||||
|
|
||||||
|
@ -179,14 +179,14 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
return; // TODO
|
return; // TODO
|
||||||
string[] split = val.Split(',');
|
string[] split = val.Split(',');
|
||||||
EventType type;
|
EventType type;
|
||||||
int _type;
|
int intType;
|
||||||
if (!int.TryParse(split[0], out _type))
|
if (!int.TryParse(split[0], out intType))
|
||||||
{
|
{
|
||||||
if (!Enum.TryParse(split[0], out type))
|
if (!Enum.TryParse(split[0], out type))
|
||||||
throw new InvalidDataException($@"Unknown event type {split[0]}");
|
throw new InvalidDataException($@"Unknown event type {split[0]}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
type = (EventType)_type;
|
type = (EventType)intType;
|
||||||
// TODO: Parse and store the rest of the event
|
// TODO: Parse and store the rest of the event
|
||||||
if (type == EventType.Background)
|
if (type == EventType.Background)
|
||||||
beatmap.BeatmapInfo.Metadata.BackgroundFile = split[2].Trim('"');
|
beatmap.BeatmapInfo.Metadata.BackgroundFile = split[2].Trim('"');
|
||||||
@ -200,7 +200,7 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
if (split.Length > 2)
|
if (split.Length > 2)
|
||||||
{
|
{
|
||||||
int kiai_flags = split.Length > 7 ? Convert.ToInt32(split[7], NumberFormatInfo.InvariantInfo) : 0;
|
int kiaiFlags = split.Length > 7 ? Convert.ToInt32(split[7], NumberFormatInfo.InvariantInfo) : 0;
|
||||||
double beatLength = double.Parse(split[1].Trim(), NumberFormatInfo.InvariantInfo);
|
double beatLength = double.Parse(split[1].Trim(), NumberFormatInfo.InvariantInfo);
|
||||||
cp = new ControlPoint
|
cp = new ControlPoint
|
||||||
{
|
{
|
||||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Beatmaps
|
|||||||
public readonly BeatmapSetInfo BeatmapSetInfo;
|
public readonly BeatmapSetInfo BeatmapSetInfo;
|
||||||
private readonly BeatmapDatabase database;
|
private readonly BeatmapDatabase database;
|
||||||
|
|
||||||
private ArchiveReader GetReader() => database?.GetReader(BeatmapSetInfo);
|
private ArchiveReader getReader() => database?.GetReader(BeatmapSetInfo);
|
||||||
|
|
||||||
private Texture background;
|
private Texture background;
|
||||||
private object backgroundLock = new object();
|
private object backgroundLock = new object();
|
||||||
@ -34,7 +34,7 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (var reader = GetReader())
|
using (var reader = getReader())
|
||||||
background = new TextureStore(new RawTextureLoaderStore(reader), false).Get(BeatmapInfo.Metadata.BackgroundFile);
|
background = new TextureStore(new RawTextureLoaderStore(reader), false).Get(BeatmapInfo.Metadata.BackgroundFile);
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
@ -57,7 +57,7 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (var reader = GetReader())
|
using (var reader = getReader())
|
||||||
using (var stream = new StreamReader(reader.GetStream(BeatmapInfo.Path)))
|
using (var stream = new StreamReader(reader.GetStream(BeatmapInfo.Path)))
|
||||||
beatmap = BeatmapDecoder.GetDecoder(stream)?.Decode(stream);
|
beatmap = BeatmapDecoder.GetDecoder(stream)?.Decode(stream);
|
||||||
}
|
}
|
||||||
@ -83,7 +83,7 @@ namespace osu.Game.Beatmaps
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
//store a reference to the reader as we may continue accessing the stream in the background.
|
//store a reference to the reader as we may continue accessing the stream in the background.
|
||||||
trackReader = GetReader();
|
trackReader = getReader();
|
||||||
var trackData = trackReader?.GetStream(BeatmapInfo.Metadata.AudioFile);
|
var trackData = trackReader?.GetStream(BeatmapInfo.Metadata.AudioFile);
|
||||||
if (trackData != null)
|
if (trackData != null)
|
||||||
track = new AudioTrackBass(trackData);
|
track = new AudioTrackBass(trackData);
|
||||||
|
@ -34,9 +34,9 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
private float time;
|
private float time;
|
||||||
|
|
||||||
private TrailDrawNodeSharedData trailDrawNodeSharedData = new TrailDrawNodeSharedData();
|
private TrailDrawNodeSharedData trailDrawNodeSharedData = new TrailDrawNodeSharedData();
|
||||||
private const int MAX_SPRITES = 2048;
|
private const int max_sprites = 2048;
|
||||||
|
|
||||||
private TrailPart[] parts = new TrailPart[MAX_SPRITES];
|
private TrailPart[] parts = new TrailPart[max_sprites];
|
||||||
|
|
||||||
private Vector2? lastPosition;
|
private Vector2? lastPosition;
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
|
||||||
for (int i = 0; i < MAX_SPRITES; i++)
|
for (int i = 0; i < max_sprites; i++)
|
||||||
{
|
{
|
||||||
parts[i].InvalidationID = 0;
|
parts[i].InvalidationID = 0;
|
||||||
parts[i].WasUpdated = true;
|
parts[i].WasUpdated = true;
|
||||||
@ -87,10 +87,10 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
|
|
||||||
time = (float)(Time.Current - timeOffset) / 500f;
|
time = (float)(Time.Current - timeOffset) / 500f;
|
||||||
if (time > fadeClockResetThreshold)
|
if (time > fadeClockResetThreshold)
|
||||||
ResetTime();
|
resetTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ResetTime()
|
private void resetTime()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < parts.Length; ++i)
|
for (int i = 0; i < parts.Length; ++i)
|
||||||
{
|
{
|
||||||
@ -134,7 +134,7 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
parts[currentIndex].Time = time;
|
parts[currentIndex].Time = time;
|
||||||
++parts[currentIndex].InvalidationID;
|
++parts[currentIndex].InvalidationID;
|
||||||
|
|
||||||
currentIndex = (currentIndex + 1) % MAX_SPRITES;
|
currentIndex = (currentIndex + 1) % max_sprites;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct TrailPart
|
struct TrailPart
|
||||||
@ -158,12 +158,12 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
public float Time;
|
public float Time;
|
||||||
public TrailDrawNodeSharedData Shared;
|
public TrailDrawNodeSharedData Shared;
|
||||||
|
|
||||||
public TrailPart[] Parts = new TrailPart[MAX_SPRITES];
|
public TrailPart[] Parts = new TrailPart[max_sprites];
|
||||||
public Vector2 Size;
|
public Vector2 Size;
|
||||||
|
|
||||||
public TrailDrawNode()
|
public TrailDrawNode()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < MAX_SPRITES; i++)
|
for (int i = 0; i < max_sprites; i++)
|
||||||
{
|
{
|
||||||
Parts[i].InvalidationID = 0;
|
Parts[i].InvalidationID = 0;
|
||||||
Parts[i].WasUpdated = false;
|
Parts[i].WasUpdated = false;
|
||||||
@ -173,7 +173,7 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
public override void Draw(Action<TexturedVertex2D> vertexAction)
|
public override void Draw(Action<TexturedVertex2D> vertexAction)
|
||||||
{
|
{
|
||||||
if (Shared.VertexBuffer == null)
|
if (Shared.VertexBuffer == null)
|
||||||
Shared.VertexBuffer = new QuadVertexBuffer<TexturedVertex2D>(MAX_SPRITES, BufferUsageHint.DynamicDraw);
|
Shared.VertexBuffer = new QuadVertexBuffer<TexturedVertex2D>(max_sprites, BufferUsageHint.DynamicDraw);
|
||||||
|
|
||||||
Shader.GetUniform<float>("g_FadeClock").Value = Time;
|
Shader.GetUniform<float>("g_FadeClock").Value = Time;
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected T count;
|
private T count;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Actual value of counter.
|
/// Actual value of counter.
|
||||||
@ -88,7 +88,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
|
|
||||||
public abstract void Increment(T amount);
|
public abstract void Increment(T amount);
|
||||||
|
|
||||||
protected float textSize;
|
private float textSize;
|
||||||
|
|
||||||
public float TextSize
|
public float TextSize
|
||||||
{
|
{
|
||||||
|
@ -56,7 +56,7 @@ namespace osu.Game.Modes.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ulong count;
|
private ulong count;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Actual value of counter.
|
/// Actual value of counter.
|
||||||
|
@ -20,8 +20,8 @@ namespace osu.Game.Online.API
|
|||||||
private OAuth authentication;
|
private OAuth authentication;
|
||||||
|
|
||||||
public string Endpoint = @"https://new.ppy.sh";
|
public string Endpoint = @"https://new.ppy.sh";
|
||||||
const string ClientId = @"5";
|
const string client_id = @"5";
|
||||||
const string ClientSecret = @"FGc9GAtyHzeQDshWP5Ah7dega8hJACAJpQtw6OXk";
|
const string client_secret = @"FGc9GAtyHzeQDshWP5Ah7dega8hJACAJpQtw6OXk";
|
||||||
|
|
||||||
ConcurrentQueue<APIRequest> queue = new ConcurrentQueue<APIRequest>();
|
ConcurrentQueue<APIRequest> queue = new ConcurrentQueue<APIRequest>();
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ namespace osu.Game.Online.API
|
|||||||
|
|
||||||
public APIAccess()
|
public APIAccess()
|
||||||
{
|
{
|
||||||
authentication = new OAuth(ClientId, ClientSecret, Endpoint);
|
authentication = new OAuth(client_id, client_secret, Endpoint);
|
||||||
log = Logger.GetLogger(LoggingTarget.Network);
|
log = Logger.GetLogger(LoggingTarget.Network);
|
||||||
|
|
||||||
thread = new Thread(run) { IsBackground = true };
|
thread = new Thread(run) { IsBackground = true };
|
||||||
@ -125,7 +125,7 @@ namespace osu.Game.Online.API
|
|||||||
//todo: this fails even on network-related issues. we should probably handle those differently.
|
//todo: this fails even on network-related issues. we should probably handle those differently.
|
||||||
//NotificationManager.ShowMessage("Login failed!");
|
//NotificationManager.ShowMessage("Login failed!");
|
||||||
log.Add(@"Login failed!");
|
log.Add(@"Login failed!");
|
||||||
ClearCredentials();
|
clearCredentials();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ namespace osu.Game.Online.API
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ClearCredentials()
|
private void clearCredentials()
|
||||||
{
|
{
|
||||||
Username = null;
|
Username = null;
|
||||||
Password = null;
|
Password = null;
|
||||||
@ -295,7 +295,7 @@ namespace osu.Game.Online.API
|
|||||||
|
|
||||||
public void Logout()
|
public void Logout()
|
||||||
{
|
{
|
||||||
ClearCredentials();
|
clearCredentials();
|
||||||
authentication.Clear();
|
authentication.Clear();
|
||||||
State = APIState.Offline;
|
State = APIState.Offline;
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,8 @@ namespace osu.Game.Overlays.Options
|
|||||||
{
|
{
|
||||||
public abstract class OptionsSection : Container
|
public abstract class OptionsSection : Container
|
||||||
{
|
{
|
||||||
protected FlowContainer content;
|
protected FlowContainer FlowContent;
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => FlowContent;
|
||||||
|
|
||||||
public abstract FontAwesome Icon { get; }
|
public abstract FontAwesome Icon { get; }
|
||||||
public abstract string Header { get; }
|
public abstract string Header { get; }
|
||||||
@ -28,22 +28,23 @@ namespace osu.Game.Overlays.Options
|
|||||||
Margin = new MarginPadding { Top = 20 };
|
Margin = new MarginPadding { Top = 20 };
|
||||||
AutoSizeAxes = Axes.Y;
|
AutoSizeAxes = Axes.Y;
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
|
|
||||||
const int headerSize = 26, headerMargin = 25;
|
const int header_size = 26;
|
||||||
const int borderSize = 2;
|
const int header_margin = 25;
|
||||||
|
const int border_size = 2;
|
||||||
AddInternal(new Drawable[]
|
AddInternal(new Drawable[]
|
||||||
{
|
{
|
||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
Colour = new Color4(0, 0, 0, 255),
|
Colour = new Color4(0, 0, 0, 255),
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Height = borderSize,
|
Height = border_size,
|
||||||
},
|
},
|
||||||
new Container
|
new Container
|
||||||
{
|
{
|
||||||
Padding = new MarginPadding
|
Padding = new MarginPadding
|
||||||
{
|
{
|
||||||
Top = 20 + borderSize,
|
Top = 20 + border_size,
|
||||||
Left = OptionsOverlay.CONTENT_MARGINS,
|
Left = OptionsOverlay.CONTENT_MARGINS,
|
||||||
Right = OptionsOverlay.CONTENT_MARGINS,
|
Right = OptionsOverlay.CONTENT_MARGINS,
|
||||||
Bottom = 10,
|
Bottom = 10,
|
||||||
@ -54,12 +55,12 @@ namespace osu.Game.Overlays.Options
|
|||||||
{
|
{
|
||||||
headerLabel = new OsuSpriteText
|
headerLabel = new OsuSpriteText
|
||||||
{
|
{
|
||||||
TextSize = headerSize,
|
TextSize = header_size,
|
||||||
Text = Header,
|
Text = Header,
|
||||||
},
|
},
|
||||||
content = new FlowContainer
|
FlowContent = new FlowContainer
|
||||||
{
|
{
|
||||||
Margin = new MarginPadding { Top = headerSize + headerMargin },
|
Margin = new MarginPadding { Top = header_size + header_margin },
|
||||||
Direction = FlowDirection.VerticalOnly,
|
Direction = FlowDirection.VerticalOnly,
|
||||||
Spacing = new Vector2(0, 30),
|
Spacing = new Vector2(0, 30),
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Overlays.Options.Sections
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
content.Spacing = new Vector2(0, 5);
|
FlowContent.Spacing = new Vector2(0, 5);
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuCheckbox
|
new OsuCheckbox
|
||||||
|
@ -15,7 +15,7 @@ namespace osu.Game.Overlays.Options.Sections
|
|||||||
|
|
||||||
public MaintenanceSection()
|
public MaintenanceSection()
|
||||||
{
|
{
|
||||||
content.Spacing = new Vector2(0, 5);
|
FlowContent.Spacing = new Vector2(0, 5);
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuButton
|
new OsuButton
|
||||||
|
@ -19,7 +19,7 @@ namespace osu.Game.Overlays.Options.Sections
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
content.Spacing = new Vector2(0, 5);
|
FlowContent.Spacing = new Vector2(0, 5);
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OptionLabel { Text = "TODO: Skin preview textures" },
|
new OptionLabel { Text = "TODO: Skin preview textures" },
|
||||||
|
@ -17,7 +17,8 @@ namespace osu.Game.Overlays.Options
|
|||||||
public class Sidebar : Container
|
public class Sidebar : Container
|
||||||
{
|
{
|
||||||
private FlowContainer content;
|
private FlowContainer content;
|
||||||
internal const int default_width = 60, expanded_width = 200;
|
internal const int DEFAULT_WIDTH = 60;
|
||||||
|
internal const int EXPANDED_WIDTH = 200;
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
public Sidebar()
|
public Sidebar()
|
||||||
@ -54,7 +55,7 @@ namespace osu.Game.Overlays.Options
|
|||||||
expandEvent = Scheduler.AddDelayed(() =>
|
expandEvent = Scheduler.AddDelayed(() =>
|
||||||
{
|
{
|
||||||
expandEvent = null;
|
expandEvent = null;
|
||||||
ResizeTo(new Vector2(expanded_width, Height), 150, EasingTypes.OutQuad);
|
ResizeTo(new Vector2(EXPANDED_WIDTH, Height), 150, EasingTypes.OutQuad);
|
||||||
}, 750);
|
}, 750);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -62,7 +63,7 @@ namespace osu.Game.Overlays.Options
|
|||||||
protected override void OnHoverLost(InputState state)
|
protected override void OnHoverLost(InputState state)
|
||||||
{
|
{
|
||||||
expandEvent?.Cancel();
|
expandEvent?.Cancel();
|
||||||
ResizeTo(new Vector2(default_width, Height), 150, EasingTypes.OutQuad);
|
ResizeTo(new Vector2(DEFAULT_WIDTH, Height), 150, EasingTypes.OutQuad);
|
||||||
base.OnHoverLost(state);
|
base.OnHoverLost(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Options
|
|||||||
private SpriteText headerText;
|
private SpriteText headerText;
|
||||||
private Box backgroundBox;
|
private Box backgroundBox;
|
||||||
private Box selectionIndicator;
|
private Box selectionIndicator;
|
||||||
public Container text;
|
private Container text;
|
||||||
public Action Action;
|
public Action Action;
|
||||||
|
|
||||||
private OptionsSection section;
|
private OptionsSection section;
|
||||||
@ -60,7 +60,7 @@ namespace osu.Game.Overlays.Options
|
|||||||
|
|
||||||
public SidebarButton()
|
public SidebarButton()
|
||||||
{
|
{
|
||||||
Height = Sidebar.default_width;
|
Height = Sidebar.DEFAULT_WIDTH;
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -73,13 +73,13 @@ namespace osu.Game.Overlays.Options
|
|||||||
},
|
},
|
||||||
text = new Container
|
text = new Container
|
||||||
{
|
{
|
||||||
Width = Sidebar.default_width,
|
Width = Sidebar.DEFAULT_WIDTH,
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
headerText = new OsuSpriteText
|
headerText = new OsuSpriteText
|
||||||
{
|
{
|
||||||
Position = new Vector2(Sidebar.default_width + 10, 0),
|
Position = new Vector2(Sidebar.DEFAULT_WIDTH + 10, 0),
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
},
|
},
|
||||||
|
@ -29,7 +29,7 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
public const float TRANSITION_LENGTH = 600;
|
public const float TRANSITION_LENGTH = 600;
|
||||||
|
|
||||||
public const float SIDEBAR_WIDTH = Sidebar.default_width;
|
public const float SIDEBAR_WIDTH = Sidebar.DEFAULT_WIDTH;
|
||||||
|
|
||||||
private const float width = 400;
|
private const float width = 400;
|
||||||
|
|
||||||
|
@ -16,10 +16,10 @@ namespace osu.Game.Overlays.Pause
|
|||||||
{
|
{
|
||||||
public class PauseButton : ClickableContainer
|
public class PauseButton : ClickableContainer
|
||||||
{
|
{
|
||||||
private const float hoverWidth = 0.9f;
|
private const float hover_width = 0.9f;
|
||||||
private const float hoverDuration = 500;
|
private const float hover_duration = 500;
|
||||||
private const float glowFadeDuration = 250;
|
private const float glow_fade_duration = 250;
|
||||||
private const float clickDuration = 200;
|
private const float click_duration = 200;
|
||||||
|
|
||||||
private Color4 backgroundColour = OsuColour.Gray(34);
|
private Color4 backgroundColour = OsuColour.Gray(34);
|
||||||
|
|
||||||
@ -67,12 +67,12 @@ namespace osu.Game.Overlays.Pause
|
|||||||
protected override bool OnClick(Framework.Input.InputState state)
|
protected override bool OnClick(Framework.Input.InputState state)
|
||||||
{
|
{
|
||||||
didClick = true;
|
didClick = true;
|
||||||
colourContainer.ResizeTo(new Vector2(1.5f, 1f), clickDuration, EasingTypes.In);
|
colourContainer.ResizeTo(new Vector2(1.5f, 1f), click_duration, EasingTypes.In);
|
||||||
flash();
|
flash();
|
||||||
SampleClick?.Play();
|
SampleClick?.Play();
|
||||||
Action?.Invoke();
|
Action?.Invoke();
|
||||||
|
|
||||||
Delay(clickDuration);
|
Delay(click_duration);
|
||||||
Schedule(delegate {
|
Schedule(delegate {
|
||||||
colourContainer.ResizeTo(new Vector2(0.8f, 1f), 0, EasingTypes.None);
|
colourContainer.ResizeTo(new Vector2(0.8f, 1f), 0, EasingTypes.None);
|
||||||
spriteText.Spacing = Vector2.Zero;
|
spriteText.Spacing = Vector2.Zero;
|
||||||
@ -84,9 +84,9 @@ namespace osu.Game.Overlays.Pause
|
|||||||
|
|
||||||
protected override bool OnHover(Framework.Input.InputState state)
|
protected override bool OnHover(Framework.Input.InputState state)
|
||||||
{
|
{
|
||||||
colourContainer.ResizeTo(new Vector2(hoverWidth, 1f), hoverDuration, EasingTypes.OutElastic);
|
colourContainer.ResizeTo(new Vector2(hover_width, 1f), hover_duration, EasingTypes.OutElastic);
|
||||||
spriteText.TransformSpacingTo(new Vector2(3f, 0f), hoverDuration, EasingTypes.OutElastic);
|
spriteText.TransformSpacingTo(new Vector2(3f, 0f), hover_duration, EasingTypes.OutElastic);
|
||||||
glowContainer.FadeIn(glowFadeDuration, EasingTypes.Out);
|
glowContainer.FadeIn(glow_fade_duration, EasingTypes.Out);
|
||||||
SampleHover?.Play();
|
SampleHover?.Play();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -95,9 +95,9 @@ namespace osu.Game.Overlays.Pause
|
|||||||
{
|
{
|
||||||
if (!didClick)
|
if (!didClick)
|
||||||
{
|
{
|
||||||
colourContainer.ResizeTo(new Vector2(0.8f, 1f), hoverDuration, EasingTypes.OutElastic);
|
colourContainer.ResizeTo(new Vector2(0.8f, 1f), hover_duration, EasingTypes.OutElastic);
|
||||||
spriteText.TransformSpacingTo(Vector2.Zero, hoverDuration, EasingTypes.OutElastic);
|
spriteText.TransformSpacingTo(Vector2.Zero, hover_duration, EasingTypes.OutElastic);
|
||||||
glowContainer.FadeOut(glowFadeDuration, EasingTypes.Out);
|
glowContainer.FadeOut(glow_fade_duration, EasingTypes.Out);
|
||||||
}
|
}
|
||||||
|
|
||||||
didClick = false;
|
didClick = false;
|
||||||
@ -115,7 +115,7 @@ namespace osu.Game.Overlays.Pause
|
|||||||
flash.Colour = ButtonColour;
|
flash.Colour = ButtonColour;
|
||||||
flash.BlendingMode = BlendingMode.Additive;
|
flash.BlendingMode = BlendingMode.Additive;
|
||||||
flash.Alpha = 0.3f;
|
flash.Alpha = 0.3f;
|
||||||
flash.FadeOutFromOne(clickDuration);
|
flash.FadeOutFromOne(click_duration);
|
||||||
flash.Expire();
|
flash.Expire();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
{
|
{
|
||||||
class ToolbarOverlayToggleButton : ToolbarButton
|
class ToolbarOverlayToggleButton : ToolbarButton
|
||||||
{
|
{
|
||||||
private Box StateBackground;
|
private Box stateBackground;
|
||||||
|
|
||||||
private OverlayContainer stateContainer;
|
private OverlayContainer stateContainer;
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
|
|
||||||
public ToolbarOverlayToggleButton()
|
public ToolbarOverlayToggleButton()
|
||||||
{
|
{
|
||||||
Add(StateBackground = new Box
|
Add(stateBackground = new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = OsuColour.Gray(150).Opacity(180),
|
Colour = OsuColour.Gray(150).Opacity(180),
|
||||||
@ -61,10 +61,10 @@ namespace osu.Game.Overlays.Toolbar
|
|||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case Visibility.Hidden:
|
case Visibility.Hidden:
|
||||||
StateBackground.FadeOut(200);
|
stateBackground.FadeOut(200);
|
||||||
break;
|
break;
|
||||||
case Visibility.Visible:
|
case Visibility.Visible:
|
||||||
StateBackground.FadeIn(200);
|
stateBackground.FadeIn(200);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
Alpha = 0;
|
Alpha = 0;
|
||||||
|
|
||||||
Vector2 boxSize = new Vector2(ButtonSystem.button_width + Math.Abs(extraWidth), ButtonSystem.button_area_height);
|
Vector2 boxSize = new Vector2(ButtonSystem.BUTTON_WIDTH + Math.Abs(extraWidth), ButtonSystem.BUTTON_AREA_HEIGHT);
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -75,7 +75,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
Colour = colour,
|
Colour = colour,
|
||||||
Scale = new Vector2(0, 1),
|
Scale = new Vector2(0, 1),
|
||||||
Size = boxSize,
|
Size = boxSize,
|
||||||
Shear = new Vector2(ButtonSystem.wedge_width / boxSize.Y, 0),
|
Shear = new Vector2(ButtonSystem.WEDGE_WIDTH / boxSize.Y, 0),
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new Box
|
new Box
|
||||||
|
@ -36,9 +36,9 @@ namespace osu.Game.Screens.Menu
|
|||||||
private FlowContainerWithOrigin buttonFlow;
|
private FlowContainerWithOrigin buttonFlow;
|
||||||
|
|
||||||
//todo: make these non-internal somehow.
|
//todo: make these non-internal somehow.
|
||||||
internal const float button_area_height = 100;
|
internal const float BUTTON_AREA_HEIGHT = 100;
|
||||||
internal const float button_width = 140f;
|
internal const float BUTTON_WIDTH = 140f;
|
||||||
internal const float wedge_width = 20;
|
internal const float WEDGE_WIDTH = 20;
|
||||||
|
|
||||||
public const int EXIT_DELAY = 3000;
|
public const int EXIT_DELAY = 3000;
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Size = new Vector2(1, button_area_height),
|
Size = new Vector2(1, BUTTON_AREA_HEIGHT),
|
||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -81,14 +81,14 @@ namespace osu.Game.Screens.Menu
|
|||||||
Direction = FlowDirection.HorizontalOnly,
|
Direction = FlowDirection.HorizontalOnly,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Spacing = new Vector2(-wedge_width, 0),
|
Spacing = new Vector2(-WEDGE_WIDTH, 0),
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
settingsButton = new Button(@"settings", @"options", FontAwesome.fa_gear, new Color4(85, 85, 85, 255), () => OnSettings?.Invoke(), -wedge_width, Key.O),
|
settingsButton = new Button(@"settings", @"options", FontAwesome.fa_gear, new Color4(85, 85, 85, 255), () => OnSettings?.Invoke(), -WEDGE_WIDTH, Key.O),
|
||||||
backButton = new Button(@"back", @"back", FontAwesome.fa_osu_left_o, new Color4(51, 58, 94, 255), onBack, -wedge_width, Key.Escape),
|
backButton = new Button(@"back", @"back", FontAwesome.fa_osu_left_o, new Color4(51, 58, 94, 255), onBack, -WEDGE_WIDTH, Key.Escape),
|
||||||
iconFacade = new Container //need a container to make the osu! icon flow properly.
|
iconFacade = new Container //need a container to make the osu! icon flow properly.
|
||||||
{
|
{
|
||||||
Size = new Vector2(0, button_area_height)
|
Size = new Vector2(0, BUTTON_AREA_HEIGHT)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
CentreTarget = iconFacade
|
CentreTarget = iconFacade
|
||||||
@ -103,11 +103,11 @@ namespace osu.Game.Screens.Menu
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
buttonsPlay.Add(new Button(@"solo", @"freeplay", FontAwesome.fa_user, new Color4(102, 68, 204, 255), () => OnSolo?.Invoke(), wedge_width, Key.P));
|
buttonsPlay.Add(new Button(@"solo", @"freeplay", FontAwesome.fa_user, new Color4(102, 68, 204, 255), () => OnSolo?.Invoke(), WEDGE_WIDTH, Key.P));
|
||||||
buttonsPlay.Add(new Button(@"multi", @"multiplayer", FontAwesome.fa_users, new Color4(94, 63, 186, 255), () => OnMulti?.Invoke(), 0, Key.M));
|
buttonsPlay.Add(new Button(@"multi", @"multiplayer", FontAwesome.fa_users, new Color4(94, 63, 186, 255), () => OnMulti?.Invoke(), 0, Key.M));
|
||||||
buttonsPlay.Add(new Button(@"chart", @"charts", FontAwesome.fa_osu_charts, new Color4(80, 53, 160, 255), () => OnChart?.Invoke()));
|
buttonsPlay.Add(new Button(@"chart", @"charts", FontAwesome.fa_osu_charts, new Color4(80, 53, 160, 255), () => OnChart?.Invoke()));
|
||||||
|
|
||||||
buttonsTopLevel.Add(new Button(@"play", @"play", FontAwesome.fa_osu_logo, new Color4(102, 68, 204, 255), onPlay, wedge_width, Key.P));
|
buttonsTopLevel.Add(new Button(@"play", @"play", FontAwesome.fa_osu_logo, new Color4(102, 68, 204, 255), onPlay, WEDGE_WIDTH, Key.P));
|
||||||
buttonsTopLevel.Add(new Button(@"osu!editor", @"edit", FontAwesome.fa_osu_edit_o, new Color4(238, 170, 0, 255), () => OnEdit?.Invoke(), 0, Key.E));
|
buttonsTopLevel.Add(new Button(@"osu!editor", @"edit", FontAwesome.fa_osu_edit_o, new Color4(238, 170, 0, 255), () => OnEdit?.Invoke(), 0, Key.E));
|
||||||
buttonsTopLevel.Add(new Button(@"osu!direct", @"direct", FontAwesome.fa_osu_chevron_down_o, new Color4(165, 204, 0, 255), () => OnDirect?.Invoke(), 0, Key.D));
|
buttonsTopLevel.Add(new Button(@"osu!direct", @"direct", FontAwesome.fa_osu_chevron_down_o, new Color4(165, 204, 0, 255), () => OnDirect?.Invoke(), 0, Key.D));
|
||||||
buttonsTopLevel.Add(new Button(@"exit", @"exit", FontAwesome.fa_osu_cross_o, new Color4(238, 51, 153, 255), onExit, 0, Key.Q));
|
buttonsTopLevel.Add(new Button(@"exit", @"exit", FontAwesome.fa_osu_cross_o, new Color4(238, 51, 153, 255), onExit, 0, Key.Q));
|
||||||
@ -127,7 +127,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
// osuLogo.SizeForFlow relies on loading to be complete.
|
// osuLogo.SizeForFlow relies on loading to be complete.
|
||||||
buttonFlow.Position = new Vector2(wedge_width * 2 - (button_width + osuLogo.SizeForFlow / 4), 0);
|
buttonFlow.Position = new Vector2(WEDGE_WIDTH * 2 - (BUTTON_WIDTH + osuLogo.SizeForFlow / 4), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
||||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
protected override BackgroundMode CreateBackground() => new BackgroundModeBeatmap(Beatmap);
|
protected override BackgroundMode CreateBackground() => new BackgroundModeBeatmap(Beatmap);
|
||||||
|
|
||||||
private static readonly Vector2 BACKGROUND_BLUR = new Vector2(20);
|
private static readonly Vector2 background_blur = new Vector2(20);
|
||||||
|
|
||||||
public FailDialog()
|
public FailDialog()
|
||||||
{
|
{
|
||||||
@ -34,7 +34,7 @@ namespace osu.Game.Screens.Play
|
|||||||
protected override void OnEntering(GameMode last)
|
protected override void OnEntering(GameMode last)
|
||||||
{
|
{
|
||||||
base.OnEntering(last);
|
base.OnEntering(last);
|
||||||
Background.Schedule(() => (Background as BackgroundModeBeatmap)?.BlurTo(BACKGROUND_BLUR, 1000));
|
Background.Schedule(() => (Background as BackgroundModeBeatmap)?.BlurTo(background_blur, 1000));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnExiting(GameMode next)
|
protected override bool OnExiting(GameMode next)
|
||||||
|
@ -18,14 +18,14 @@ namespace osu.Game.Screens.Ranking
|
|||||||
{
|
{
|
||||||
protected override BackgroundMode CreateBackground() => new BackgroundModeBeatmap(Beatmap);
|
protected override BackgroundMode CreateBackground() => new BackgroundModeBeatmap(Beatmap);
|
||||||
|
|
||||||
private static readonly Vector2 BACKGROUND_BLUR = new Vector2(20);
|
private static readonly Vector2 background_blur = new Vector2(20);
|
||||||
|
|
||||||
ScoreDisplay scoreDisplay;
|
ScoreDisplay scoreDisplay;
|
||||||
|
|
||||||
protected override void OnEntering(GameMode last)
|
protected override void OnEntering(GameMode last)
|
||||||
{
|
{
|
||||||
base.OnEntering(last);
|
base.OnEntering(last);
|
||||||
Background.Schedule(() => (Background as BackgroundModeBeatmap)?.BlurTo(BACKGROUND_BLUR, 1000));
|
Background.Schedule(() => (Background as BackgroundModeBeatmap)?.BlurTo(background_blur, 1000));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnExiting(GameMode next)
|
protected override bool OnExiting(GameMode next)
|
||||||
|
@ -30,13 +30,13 @@ namespace osu.Game.Screens.Select
|
|||||||
public BeatmapPanel SelectedPanel { get; private set; }
|
public BeatmapPanel SelectedPanel { get; private set; }
|
||||||
|
|
||||||
private List<float> yPositions = new List<float>();
|
private List<float> yPositions = new List<float>();
|
||||||
private CarouselLifetimeList<Panel> Lifetime;
|
private CarouselLifetimeList<Panel> lifetime;
|
||||||
|
|
||||||
public CarouselContainer()
|
public CarouselContainer()
|
||||||
{
|
{
|
||||||
DistanceDecayJump = 0.01;
|
DistanceDecayJump = 0.01;
|
||||||
|
|
||||||
Add(scrollableContent = new Container<Panel>(Lifetime = new CarouselLifetimeList<Panel>(DepthComparer))
|
Add(scrollableContent = new Container<Panel>(lifetime = new CarouselLifetimeList<Panel>(DepthComparer))
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
});
|
});
|
||||||
@ -187,9 +187,9 @@ namespace osu.Game.Screens.Select
|
|||||||
private static float offsetX(float dist, float halfHeight)
|
private static float offsetX(float dist, float halfHeight)
|
||||||
{
|
{
|
||||||
// The radius of the circle the carousel moves on.
|
// The radius of the circle the carousel moves on.
|
||||||
const float CIRCLE_RADIUS = 3;
|
const float circle_radius = 3;
|
||||||
double discriminant = Math.Max(0, CIRCLE_RADIUS * CIRCLE_RADIUS - dist * dist);
|
double discriminant = Math.Max(0, circle_radius * circle_radius - dist * dist);
|
||||||
float x = (CIRCLE_RADIUS - (float)Math.Sqrt(discriminant)) * halfHeight;
|
float x = (circle_radius - (float)Math.Sqrt(discriminant)) * halfHeight;
|
||||||
|
|
||||||
return 125 + x;
|
return 125 + x;
|
||||||
}
|
}
|
||||||
@ -226,7 +226,7 @@ namespace osu.Game.Screens.Select
|
|||||||
float drawHeight = DrawHeight;
|
float drawHeight = DrawHeight;
|
||||||
float halfHeight = drawHeight / 2;
|
float halfHeight = drawHeight / 2;
|
||||||
|
|
||||||
foreach (Panel p in Lifetime.AliveItems)
|
foreach (Panel p in lifetime.AliveItems)
|
||||||
{
|
{
|
||||||
float panelPosY = p.Position.Y;
|
float panelPosY = p.Position.Y;
|
||||||
p.IsOnScreen = panelPosY >= Current - p.DrawHeight && panelPosY <= Current + drawHeight;
|
p.IsOnScreen = panelPosY >= Current - p.DrawHeight && panelPosY <= Current + drawHeight;
|
||||||
@ -240,12 +240,12 @@ namespace osu.Game.Screens.Select
|
|||||||
int lastIndex = yPositions.BinarySearch(Current + drawHeight);
|
int lastIndex = yPositions.BinarySearch(Current + drawHeight);
|
||||||
if (lastIndex < 0) lastIndex = ~lastIndex;
|
if (lastIndex < 0) lastIndex = ~lastIndex;
|
||||||
|
|
||||||
Lifetime.StartIndex = firstIndex;
|
lifetime.StartIndex = firstIndex;
|
||||||
Lifetime.EndIndex = lastIndex;
|
lifetime.EndIndex = lastIndex;
|
||||||
|
|
||||||
for (int i = firstIndex; i < lastIndex; ++i)
|
for (int i = firstIndex; i < lastIndex; ++i)
|
||||||
{
|
{
|
||||||
Panel p = Lifetime[i];
|
Panel p = lifetime[i];
|
||||||
if (p.State != PanelSelectedState.Hidden)
|
if (p.State != PanelSelectedState.Hidden)
|
||||||
p.IsOnScreen = true; //we don't want to update the on-screen state of hidden pannels as they have incorrect (stacked) y values.
|
p.IsOnScreen = true; //we don't want to update the on-screen state of hidden pannels as they have incorrect (stacked) y values.
|
||||||
updatePanel(p, halfHeight);
|
updatePanel(p, halfHeight);
|
||||||
|
@ -81,13 +81,13 @@ namespace osu.Game.Screens.Select
|
|||||||
set { text.Text = value; }
|
set { text.Text = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FadeActive()
|
private void fadeActive()
|
||||||
{
|
{
|
||||||
box.FadeIn(300);
|
box.FadeIn(300);
|
||||||
text.FadeColour(Color4.White, 300);
|
text.FadeColour(Color4.White, 300);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FadeInactive()
|
private void fadeInactive()
|
||||||
{
|
{
|
||||||
box.FadeOut(300);
|
box.FadeOut(300);
|
||||||
text.FadeColour(fadeColour, 300);
|
text.FadeColour(fadeColour, 300);
|
||||||
@ -101,9 +101,9 @@ namespace osu.Game.Screens.Select
|
|||||||
{
|
{
|
||||||
active = value;
|
active = value;
|
||||||
if (active)
|
if (active)
|
||||||
FadeActive();
|
fadeActive();
|
||||||
else
|
else
|
||||||
FadeInactive();
|
fadeInactive();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,14 +114,14 @@ namespace osu.Game.Screens.Select
|
|||||||
protected override bool OnHover(InputState state)
|
protected override bool OnHover(InputState state)
|
||||||
{
|
{
|
||||||
if (!active)
|
if (!active)
|
||||||
FadeActive();
|
fadeActive();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnHoverLost(InputState state)
|
protected override void OnHoverLost(InputState state)
|
||||||
{
|
{
|
||||||
if (!active)
|
if (!active)
|
||||||
FadeInactive();
|
fadeInactive();
|
||||||
}
|
}
|
||||||
|
|
||||||
public TabItem()
|
public TabItem()
|
||||||
|
@ -54,10 +54,10 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
public Footer()
|
public Footer()
|
||||||
{
|
{
|
||||||
const float bottomToolHeight = 50;
|
const float bottom_tool_height = 50;
|
||||||
|
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Height = bottomToolHeight;
|
Height = bottom_tool_height;
|
||||||
Anchor = Anchor.BottomCentre;
|
Anchor = Anchor.BottomCentre;
|
||||||
Origin = Anchor.BottomCentre;
|
Origin = Anchor.BottomCentre;
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
|
@ -48,7 +48,7 @@ namespace osu.Game.Screens.Select
|
|||||||
private static readonly Vector2 wedged_container_start_position = new Vector2(0, 50);
|
private static readonly Vector2 wedged_container_start_position = new Vector2(0, 50);
|
||||||
private BeatmapInfoWedge beatmapInfoWedge;
|
private BeatmapInfoWedge beatmapInfoWedge;
|
||||||
|
|
||||||
private static readonly Vector2 BACKGROUND_BLUR = new Vector2(20);
|
private static readonly Vector2 background_blur = new Vector2(20);
|
||||||
private CancellationTokenSource initialAddSetsTask;
|
private CancellationTokenSource initialAddSetsTask;
|
||||||
|
|
||||||
private AudioSample sampleChangeDifficulty;
|
private AudioSample sampleChangeDifficulty;
|
||||||
@ -116,8 +116,8 @@ namespace osu.Game.Screens.Select
|
|||||||
private void load(BeatmapDatabase beatmaps, AudioManager audio, BaseGame game,
|
private void load(BeatmapDatabase beatmaps, AudioManager audio, BaseGame game,
|
||||||
OsuGame osuGame, OsuColour colours)
|
OsuGame osuGame, OsuColour colours)
|
||||||
{
|
{
|
||||||
const float carouselWidth = 640;
|
const float carousel_width = 640;
|
||||||
const float bottomToolHeight = 50;
|
const float bottom_tool_height = 50;
|
||||||
beatmapGroups = new List<BeatmapGroup>();
|
beatmapGroups = new List<BeatmapGroup>();
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
@ -130,14 +130,14 @@ namespace osu.Game.Screens.Select
|
|||||||
new WedgeBackground
|
new WedgeBackground
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Padding = new MarginPadding { Right = carouselWidth * 0.76f },
|
Padding = new MarginPadding { Right = carousel_width * 0.76f },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
carousel = new CarouselContainer
|
carousel = new CarouselContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Y,
|
RelativeSizeAxes = Axes.Y,
|
||||||
Size = new Vector2(carouselWidth, 1),
|
Size = new Vector2(carousel_width, 1),
|
||||||
Anchor = Anchor.CentreRight,
|
Anchor = Anchor.CentreRight,
|
||||||
Origin = Anchor.CentreRight,
|
Origin = Anchor.CentreRight,
|
||||||
},
|
},
|
||||||
@ -299,7 +299,7 @@ namespace osu.Game.Screens.Select
|
|||||||
if (backgroundModeBeatmap != null)
|
if (backgroundModeBeatmap != null)
|
||||||
{
|
{
|
||||||
backgroundModeBeatmap.Beatmap = beatmap;
|
backgroundModeBeatmap.Beatmap = beatmap;
|
||||||
backgroundModeBeatmap.BlurTo(BACKGROUND_BLUR, 1000);
|
backgroundModeBeatmap.BlurTo(background_blur, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (beatmap != null)
|
if (beatmap != null)
|
||||||
|
@ -1,12 +1,30 @@
|
|||||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/AnalysisEnabled/@EntryValue">SOLUTION</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeRedundantParentheses/@EntryIndexedValue">SUGGESTION</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=CompareOfFloatsByEqualityOperator/@EntryIndexedValue">HINT</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EmptyGeneralCatchClause/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EmptyGeneralCatchClause/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=FieldCanBeMadeReadOnly_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=FieldCanBeMadeReadOnly_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=FieldCanBeMadeReadOnly_002ELocal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=FieldCanBeMadeReadOnly_002ELocal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=InconsistentNaming/@EntryIndexedValue">ERROR</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=InvertIf/@EntryIndexedValue">HINT</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MemberCanBeMadeStatic_002ELocal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MemberCanBeMadeStatic_002ELocal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MemberCanBePrivate_002EGlobal/@EntryIndexedValue">HINT</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MemberCanBePrivate_002ELocal/@EntryIndexedValue">HINT</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantCommaInAttributeList/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantCommaInEnumDeclaration/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantCommaInInitializer/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantEmptyObjectCreationArgumentList/@EntryIndexedValue"></s:String>
|
||||||
|
<s:Boolean x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantEmptyObjectCreationArgumentList/@EntryIndexRemoved">True</s:Boolean>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantUsingDirective/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantUsingDirective/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantVerbatimStringPrefix/@EntryIndexedValue">HINT</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FBuiltInTypes/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FBuiltInTypes/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FSimpleTypes/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SwitchStatementMissingSomeCases/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SwitchStatementMissingSomeCases/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=Code_0020Cleanup_0020_0028peppy_0029/@EntryIndexedValue"><?xml version="1.0" encoding="utf-16"?><Profile name="Code Cleanup (peppy)"><CSArrangeThisQualifier>True</CSArrangeThisQualifier><RemoveCodeRedundancies>True</RemoveCodeRedundancies><CSUseVar><BehavourStyle>CAN_CHANGE_TO_EXPLICIT</BehavourStyle><LocalVariableStyle>ALWAYS_EXPLICIT</LocalVariableStyle><ForeachVariableStyle>ALWAYS_EXPLICIT</ForeachVariableStyle></CSUseVar><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings><CSShortenReferences>True</CSShortenReferences><CSReformatCode>True</CSReformatCode><CSReorderTypeMembers>True</CSReorderTypeMembers></Profile></s:String>
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedMember_002EGlobal/@EntryIndexedValue">HINT</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedMethodReturnValue_002ELocal/@EntryIndexedValue">SUGGESTION</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnusedParameter_002EGlobal/@EntryIndexedValue">HINT</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/CodeCleanup/Profiles/=Code_0020Cleanup_0020_0028peppy_0029/@EntryIndexedValue"><?xml version="1.0" encoding="utf-16"?><Profile name="Code Cleanup (peppy)"><CSArrangeThisQualifier>True</CSArrangeThisQualifier><CSUseVar><BehavourStyle>CAN_CHANGE_TO_EXPLICIT</BehavourStyle><LocalVariableStyle>ALWAYS_EXPLICIT</LocalVariableStyle><ForeachVariableStyle>ALWAYS_EXPLICIT</ForeachVariableStyle></CSUseVar><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings><CSShortenReferences>True</CSShortenReferences><CSReformatCode>True</CSReformatCode><CSUpdateFileHeader>True</CSUpdateFileHeader><CSCodeStyleAttributes ArrangeTypeAccessModifier="False" ArrangeTypeMemberAccessModifier="False" SortModifiers="True" RemoveRedundantParentheses="True" AddMissingParentheses="False" ArrangeBraces="False" ArrangeAttributes="False" ArrangeArgumentsStyle="False" /><XAMLCollapseEmptyTags>False</XAMLCollapseEmptyTags><CSFixBuiltinTypeReferences>True</CSFixBuiltinTypeReferences><CSArrangeQualifiers>True</CSArrangeQualifiers></Profile></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/CodeCleanup/RecentlyUsedProfile/@EntryValue">Code Cleanup (peppy)</s:String>
|
||||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_LINQ_QUERY/@EntryValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_LINQ_QUERY/@EntryValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTILINE_CALLS_CHAIN/@EntryValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTILINE_CALLS_CHAIN/@EntryValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTILINE_EXTENDS_LIST/@EntryValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTILINE_EXTENDS_LIST/@EntryValue">True</s:Boolean>
|
||||||
@ -17,6 +35,7 @@
|
|||||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTLINE_TYPE_PARAMETER_LIST/@EntryValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_MULTLINE_TYPE_PARAMETER_LIST/@EntryValue">True</s:Boolean>
|
||||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue">NEXT_LINE</s:String>
|
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue">NEXT_LINE</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INITIALIZER_BRACES/@EntryValue">NEXT_LINE</s:String>
|
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INITIALIZER_BRACES/@EntryValue">NEXT_LINE</s:String>
|
||||||
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/LINE_FEED_AT_FILE_END/@EntryValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_CONSTRUCTOR_INITIALIZER_ON_SAME_LINE/@EntryValue">False</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_CONSTRUCTOR_INITIALIZER_ON_SAME_LINE/@EntryValue">False</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AFTER_TYPECAST_PARENTHESES/@EntryValue">False</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AFTER_TYPECAST_PARENTHESES/@EntryValue">False</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AROUND_MULTIPLICATIVE_OP/@EntryValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AROUND_MULTIPLICATIVE_OP/@EntryValue">True</s:Boolean>
|
||||||
@ -29,6 +48,23 @@
|
|||||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_BEFORE_BINARY_OPSIGN/@EntryValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_BEFORE_BINARY_OPSIGN/@EntryValue">True</s:Boolean>
|
||||||
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_LIMIT/@EntryValue">200</s:Int64>
|
<s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_LIMIT/@EntryValue">200</s:Int64>
|
||||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_OBJECT_AND_COLLECTION_INITIALIZER_STYLE/@EntryValue">CHOP_ALWAYS</s:String>
|
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_OBJECT_AND_COLLECTION_INITIALIZER_STYLE/@EntryValue">CHOP_ALWAYS</s:String>
|
||||||
|
<s:Boolean x:Key="/Default/CodeStyle/EncapsulateField/MakeFieldPrivate/@EntryValue">False</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/CodeStyle/EncapsulateField/UseAutoProperty/@EntryValue">False</s:Boolean>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=AABB/@EntryIndexedValue">AABB</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=API/@EntryIndexedValue">API</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=BPM/@EntryIndexedValue">BPM</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GC/@EntryIndexedValue">GC</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GL/@EntryIndexedValue">GL</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GLSL/@EntryIndexedValue">GLSL</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=HID/@EntryIndexedValue">HID</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ID/@EntryIndexedValue">ID</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IP/@EntryIndexedValue">IP</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IPC/@EntryIndexedValue">IPC</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=LTRB/@EntryIndexedValue">LTRB</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RNG/@EntryIndexedValue">RNG</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SRGB/@EntryIndexedValue">SRGB</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=TK/@EntryIndexedValue">TK</s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=EnumMember/@EntryIndexedValue">HINT</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/CSharpFileLayoutPatterns/Pattern/@EntryValue"><?xml version="1.0" encoding="utf-16"?>
|
<s:String x:Key="/Default/CodeStyle/CSharpFileLayoutPatterns/Pattern/@EntryValue"><?xml version="1.0" encoding="utf-16"?>
|
||||||
<Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns">
|
<Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns">
|
||||||
<TypePattern DisplayName="COM interfaces or structs">
|
<TypePattern DisplayName="COM interfaces or structs">
|
||||||
@ -413,17 +449,25 @@
|
|||||||
</Group>
|
</Group>
|
||||||
</TypePattern>
|
</TypePattern>
|
||||||
</Patterns></s:String>
|
</Patterns></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/FileHeader/FileHeaderText/@EntryValue">Copyright (c) 2007-$CURRENT_YEAR$ ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
|
||||||
|
</s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=Constants/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /></s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=Constants/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=EnumMember/@EntryIndexedValue"><Policy Inspect="False" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=LocalConstants/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aa_bb" /></s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=LocalConstants/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aa_bb" /></s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateConstants/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aa_bb" /></s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateConstants/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aa_bb" /></s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb"><ExtraRule Prefix="_" Suffix="" Style="aaBb" /></Policy></s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb"><ExtraRule Prefix="_" Suffix="" Style="aaBb" /></Policy></s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticReadonly/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aa_bb" /></s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticReadonly/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aa_bb" /></s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=StaticReadonly/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /></s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=StaticReadonly/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=TypeParameters/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=9d1af99b_002Dbefe_002D48a4_002D9eb3_002D661384e29869/@EntryIndexedValue"><Policy><Descriptor Staticness="Static, Instance" AccessRightKinds="Private" Description="private methods"><ElementKinds><Kind Name="ASYNC_METHOD" /><Kind Name="METHOD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></Policy></s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=9d1af99b_002Dbefe_002D48a4_002D9eb3_002D661384e29869/@EntryIndexedValue"><Policy><Descriptor Staticness="Static, Instance" AccessRightKinds="Private" Description="private methods"><ElementKinds><Kind Name="ASYNC_METHOD" /><Kind Name="METHOD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></Policy></s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=9ffbe43b_002Dc610_002D411b_002D9839_002D1416a146d9b0/@EntryIndexedValue"><Policy><Descriptor Staticness="Static, Instance" AccessRightKinds="Protected, ProtectedInternal, Internal, Public" Description="internal/protected/public methods"><ElementKinds><Kind Name="ASYNC_METHOD" /><Kind Name="METHOD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></Policy></s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=9ffbe43b_002Dc610_002D411b_002D9839_002D1416a146d9b0/@EntryIndexedValue"><Policy><Descriptor Staticness="Static, Instance" AccessRightKinds="Protected, ProtectedInternal, Internal, Public" Description="internal/protected/public methods"><ElementKinds><Kind Name="ASYNC_METHOD" /><Kind Name="METHOD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></Policy></s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=a4c2df6c_002Db202_002D48d5_002Db077_002De678cb548c25/@EntryIndexedValue"><Policy><Descriptor Staticness="Static, Instance" AccessRightKinds="Private" Description="private properties"><ElementKinds><Kind Name="PROPERTY" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></Policy></s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=a4c2df6c_002Db202_002D48d5_002Db077_002De678cb548c25/@EntryIndexedValue"><Policy><Descriptor Staticness="Static, Instance" AccessRightKinds="Private" Description="private properties"><ElementKinds><Kind Name="PROPERTY" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></Policy></s:String>
|
||||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=fd562728_002Dc23d_002D417f_002Da19f_002D9d854247fbea/@EntryIndexedValue"><Policy><Descriptor Staticness="Static, Instance" AccessRightKinds="Protected, ProtectedInternal, Internal, Public" Description="internal/protected/public properties"><ElementKinds><Kind Name="PROPERTY" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></Policy></s:String>
|
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=fd562728_002Dc23d_002D417f_002Da19f_002D9d854247fbea/@EntryIndexedValue"><Policy><Descriptor Staticness="Static, Instance" AccessRightKinds="Protected, ProtectedInternal, Internal, Public" Description="internal/protected/public properties"><ElementKinds><Kind Name="PROPERTY" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></Policy></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=NAMESPACE_005FALIAS/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FFIELD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
|
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FRESOURCE/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAlwaysTreatStructAsNotReorderableMigration/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAlwaysTreatStructAsNotReorderableMigration/@EntryIndexedValue">True</s:Boolean>
|
||||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
|
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
Loading…
Reference in New Issue
Block a user