mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
API1
This commit is contained in:
@ -2,6 +2,8 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Graphics.Colour;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Graphics
|
||||
{
|
||||
@ -13,5 +15,22 @@ namespace osu.Game.Graphics
|
||||
public static readonly Color4 CUTTINGEDGE = new Color4(238, 170, 0, 255);
|
||||
public static readonly Color4 LAZER = new Color4(237, 18, 33, 255);
|
||||
public static readonly Color4 WEB = new Color4(136, 102, 238, 255);
|
||||
|
||||
private static readonly Dictionary<string, ColourInfo> colours = new Dictionary<string, ColourInfo>
|
||||
{
|
||||
{ "stable40", STABLE },
|
||||
{ "stable", STABLEFALLBACK },
|
||||
{ "beta40", BETA },
|
||||
{ "cuttingedge", CUTTINGEDGE },
|
||||
{ "lazer", LAZER },
|
||||
{ "web", WEB },
|
||||
};
|
||||
|
||||
public static ColourInfo FromStreamName(string name)
|
||||
{
|
||||
if (colours.TryGetValue(name, out ColourInfo colour))
|
||||
return colour;
|
||||
else return new Color4(255, 255, 255, 255);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user