2018-07-20 01:07:24 +08:00
|
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
using osu.Framework.Graphics.Shapes;
|
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
|
|
|
|
using osu.Game.Graphics;
|
2018-07-21 13:16:22 +08:00
|
|
|
|
using osu.Game.Online.API.Requests.Responses;
|
2018-07-20 01:07:24 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.Changelog
|
|
|
|
|
{
|
|
|
|
|
// maybe look to osu.Game.Screens.Play.SquareGraph for reference later
|
2018-07-20 03:49:13 +08:00
|
|
|
|
// placeholder json file: https://api.myjson.com/bins/10ye8a
|
2018-07-20 01:07:24 +08:00
|
|
|
|
public class ChangelogChart : BufferedContainer
|
|
|
|
|
{
|
2018-07-21 13:16:22 +08:00
|
|
|
|
private Box background;
|
|
|
|
|
|
2018-07-20 01:07:24 +08:00
|
|
|
|
public ChangelogChart()
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.X;
|
|
|
|
|
Height = 100;
|
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
2018-07-21 13:16:22 +08:00
|
|
|
|
background = new Box
|
2018-07-20 01:07:24 +08:00
|
|
|
|
{
|
|
|
|
|
Colour = StreamColour.STABLE,
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
},
|
|
|
|
|
new SpriteText
|
|
|
|
|
{
|
|
|
|
|
Text = "Graph Placeholder",
|
|
|
|
|
TextSize = 28,
|
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
}
|
2018-07-21 13:16:22 +08:00
|
|
|
|
|
|
|
|
|
public void ShowChart(APIChangelog releaseStream)
|
|
|
|
|
{
|
|
|
|
|
background.Colour = StreamColour.FromStreamName(releaseStream.UpdateStream.Name);
|
|
|
|
|
}
|
2018-07-20 01:07:24 +08:00
|
|
|
|
}
|
|
|
|
|
}
|