mirror of
https://github.com/ppy/osu
synced 2024-12-26 00:32:52 +00:00
Cleanup pass
This commit is contained in:
parent
a0ddc6d77a
commit
cb62008280
@ -40,8 +40,10 @@ namespace osu.Game.Graphics
|
||||
// See https://github.com/ppy/osu-web/blob/master/resources/assets/less/colors.less
|
||||
public readonly Color4 PurpleLighter = FromHex(@"eeeeff");
|
||||
public readonly Color4 PurpleLight = FromHex(@"aa88ff");
|
||||
public readonly Color4 PurpleLightAlternative = FromHex(@"cba4da");
|
||||
public readonly Color4 Purple = FromHex(@"8866ee");
|
||||
public readonly Color4 PurpleDark = FromHex(@"6644cc");
|
||||
public readonly Color4 PurpleDarkAlternative = FromHex(@"312436");
|
||||
public readonly Color4 PurpleDarker = FromHex(@"441188");
|
||||
|
||||
public readonly Color4 PinkLighter = FromHex(@"ffddee");
|
||||
|
@ -31,10 +31,7 @@ namespace osu.Game.Overlays.Changelog
|
||||
{
|
||||
Current.Value = null;
|
||||
|
||||
foreach (APIUpdateStream updateStream in streams)
|
||||
{
|
||||
AddItem(updateStream);
|
||||
}
|
||||
foreach (APIUpdateStream updateStream in streams) AddItem(updateStream);
|
||||
}
|
||||
|
||||
protected override bool OnHover(HoverEvent e)
|
||||
|
@ -18,12 +18,13 @@ using osu.Game.Input.Bindings;
|
||||
using osu.Game.Online.API.Requests;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Overlays.Changelog;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays
|
||||
{
|
||||
public class ChangelogOverlay : FullscreenOverlay
|
||||
{
|
||||
public readonly Bindable<APIChangelogBuild> Current = new Bindable<APIChangelogBuild>();
|
||||
|
||||
private ChangelogHeader header;
|
||||
|
||||
private Container<ChangelogContent> content;
|
||||
@ -32,23 +33,6 @@ namespace osu.Game.Overlays
|
||||
|
||||
private List<APIChangelogBuild> builds;
|
||||
|
||||
public readonly Bindable<APIChangelogBuild> Current = new Bindable<APIChangelogBuild>();
|
||||
|
||||
public void ShowListing() => Current.Value = null;
|
||||
|
||||
/// <summary>
|
||||
/// Fetches and shows a specific build from a specific update stream.
|
||||
/// </summary>
|
||||
/// <param name="build">Must contain at least <see cref="APIUpdateStream.Name"/> and
|
||||
/// <see cref="APIChangelogBuild.Version"/>. If <see cref="APIUpdateStream.DisplayName"/> and
|
||||
/// <see cref="APIChangelogBuild.DisplayVersion"/> are specified, the header will instantly display them.</param>
|
||||
public void ShowBuild([NotNull] APIChangelogBuild build)
|
||||
{
|
||||
if (build == null) throw new ArgumentNullException(nameof(build));
|
||||
|
||||
Current.Value = build;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audio, OsuColour colour)
|
||||
{
|
||||
@ -62,7 +46,7 @@ namespace osu.Game.Overlays
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = new Color4(49, 36, 54, 255),
|
||||
Colour = colour.PurpleDarkAlternative,
|
||||
},
|
||||
new ScrollContainer
|
||||
{
|
||||
@ -102,6 +86,21 @@ namespace osu.Game.Overlays
|
||||
});
|
||||
}
|
||||
|
||||
public void ShowListing() => Current.Value = null;
|
||||
|
||||
/// <summary>
|
||||
/// Fetches and shows a specific build from a specific update stream.
|
||||
/// </summary>
|
||||
/// <param name="build">Must contain at least <see cref="APIUpdateStream.Name"/> and
|
||||
/// <see cref="APIChangelogBuild.Version"/>. If <see cref="APIUpdateStream.DisplayName"/> and
|
||||
/// <see cref="APIChangelogBuild.DisplayVersion"/> are specified, the header will instantly display them.</param>
|
||||
public void ShowBuild([NotNull] APIChangelogBuild build)
|
||||
{
|
||||
if (build == null) throw new ArgumentNullException(nameof(build));
|
||||
|
||||
Current.Value = build;
|
||||
}
|
||||
|
||||
public override bool OnPressed(GlobalAction action)
|
||||
{
|
||||
switch (action)
|
||||
|
Loading…
Reference in New Issue
Block a user