mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 10:02:59 +08:00
Resolve dependencies via Resolved Attribute
This commit is contained in:
parent
58564579e4
commit
0a867e37af
@ -18,11 +18,14 @@ namespace osu.Game.Overlays.Settings
|
|||||||
{
|
{
|
||||||
public class SettingsFooter : FillFlowContainer
|
public class SettingsFooter : FillFlowContainer
|
||||||
{
|
{
|
||||||
private OsuGameBase game;
|
[Resolved]
|
||||||
private ChangelogOverlay changelog;
|
private OsuGameBase game { get; set; }
|
||||||
|
|
||||||
|
[Resolved(CanBeNull = true)]
|
||||||
|
private ChangelogOverlay changelog { get; set; }
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load(OsuGameBase game, OsuColour colours, RulesetStore rulesets, ChangelogOverlay changelog)
|
private void load(OsuGameBase game, OsuColour colours, RulesetStore rulesets)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
AutoSizeAxes = Axes.Y;
|
AutoSizeAxes = Axes.Y;
|
||||||
@ -71,9 +74,6 @@ 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)
|
protected override bool OnClick(ClickEvent e)
|
||||||
@ -82,6 +82,7 @@ namespace osu.Game.Overlays.Settings
|
|||||||
{
|
{
|
||||||
changelog?.ShowBuild("lazer", game.Version);
|
changelog?.ShowBuild("lazer", game.Version);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user