mirror of
https://github.com/ppy/osu
synced 2025-01-14 01:51:04 +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
|
// See https://github.com/ppy/osu-web/blob/master/resources/assets/less/colors.less
|
||||||
public readonly Color4 PurpleLighter = FromHex(@"eeeeff");
|
public readonly Color4 PurpleLighter = FromHex(@"eeeeff");
|
||||||
public readonly Color4 PurpleLight = FromHex(@"aa88ff");
|
public readonly Color4 PurpleLight = FromHex(@"aa88ff");
|
||||||
|
public readonly Color4 PurpleLightAlternative = FromHex(@"cba4da");
|
||||||
public readonly Color4 Purple = FromHex(@"8866ee");
|
public readonly Color4 Purple = FromHex(@"8866ee");
|
||||||
public readonly Color4 PurpleDark = FromHex(@"6644cc");
|
public readonly Color4 PurpleDark = FromHex(@"6644cc");
|
||||||
|
public readonly Color4 PurpleDarkAlternative = FromHex(@"312436");
|
||||||
public readonly Color4 PurpleDarker = FromHex(@"441188");
|
public readonly Color4 PurpleDarker = FromHex(@"441188");
|
||||||
|
|
||||||
public readonly Color4 PinkLighter = FromHex(@"ffddee");
|
public readonly Color4 PinkLighter = FromHex(@"ffddee");
|
||||||
|
@ -31,10 +31,7 @@ namespace osu.Game.Overlays.Changelog
|
|||||||
{
|
{
|
||||||
Current.Value = null;
|
Current.Value = null;
|
||||||
|
|
||||||
foreach (APIUpdateStream updateStream in streams)
|
foreach (APIUpdateStream updateStream in streams) AddItem(updateStream);
|
||||||
{
|
|
||||||
AddItem(updateStream);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnHover(HoverEvent e)
|
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;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using osu.Game.Overlays.Changelog;
|
using osu.Game.Overlays.Changelog;
|
||||||
using osuTK.Graphics;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays
|
namespace osu.Game.Overlays
|
||||||
{
|
{
|
||||||
public class ChangelogOverlay : FullscreenOverlay
|
public class ChangelogOverlay : FullscreenOverlay
|
||||||
{
|
{
|
||||||
|
public readonly Bindable<APIChangelogBuild> Current = new Bindable<APIChangelogBuild>();
|
||||||
|
|
||||||
private ChangelogHeader header;
|
private ChangelogHeader header;
|
||||||
|
|
||||||
private Container<ChangelogContent> content;
|
private Container<ChangelogContent> content;
|
||||||
@ -32,23 +33,6 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
private List<APIChangelogBuild> builds;
|
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]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio, OsuColour colour)
|
private void load(AudioManager audio, OsuColour colour)
|
||||||
{
|
{
|
||||||
@ -62,7 +46,7 @@ namespace osu.Game.Overlays
|
|||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = new Color4(49, 36, 54, 255),
|
Colour = colour.PurpleDarkAlternative,
|
||||||
},
|
},
|
||||||
new ScrollContainer
|
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)
|
public override bool OnPressed(GlobalAction action)
|
||||||
{
|
{
|
||||||
switch (action)
|
switch (action)
|
||||||
|
Loading…
Reference in New Issue
Block a user