1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:07:38 +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.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
@ -17,8 +18,11 @@ namespace osu.Game.Overlays.Settings
{
public class SettingsFooter : FillFlowContainer
{
private OsuGameBase game;
private ChangelogOverlay changelog;
[BackgroundDependencyLoader]
private void load(OsuGameBase game, OsuColour colours, RulesetStore rulesets)
private void load(OsuGameBase game, OsuColour colours, RulesetStore rulesets, ChangelogOverlay changelog)
{
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
@ -67,6 +71,17 @@ namespace osu.Game.Overlays.Settings
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);
}
}
}