1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 15:12:57 +08:00

Show changelog for current build by clicking on settings footer in settings overlay.

This commit is contained in:
Lucas A 2019-05-31 17:43:58 +02:00
parent 1c96e7593a
commit 55c0c6a1bb

View File

@ -5,6 +5,7 @@ using System.Collections.Generic;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Events;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
@ -17,8 +18,11 @@ namespace osu.Game.Overlays.Settings
{ {
public class SettingsFooter : FillFlowContainer public class SettingsFooter : FillFlowContainer
{ {
private OsuGameBase game;
private ChangelogOverlay changelog;
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(OsuGameBase game, OsuColour colours, RulesetStore rulesets) private void load(OsuGameBase game, OsuColour colours, RulesetStore rulesets, ChangelogOverlay changelog)
{ {
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y; AutoSizeAxes = Axes.Y;
@ -67,6 +71,17 @@ namespace osu.Game.Overlays.Settings
Colour = DebugUtils.IsDebug ? colours.Red : Color4.White, Colour = DebugUtils.IsDebug ? colours.Red : Color4.White,
}, },
}; };
this.game = game;
this.changelog = changelog;
}
protected override bool OnClick(ClickEvent e)
{
if (!game.IsDeployedBuild) return base.OnClick(e);
changelog?.ShowBuild("lazer", game.Version);
return base.OnClick(e);
} }
} }
} }