mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Use [Resolved] wherever possible
This commit is contained in:
@ -14,15 +14,10 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
{
|
||||
protected override string Header => "Devices";
|
||||
|
||||
private AudioManager audio;
|
||||
[Resolved]
|
||||
private AudioManager audio { get; set; }
|
||||
private SettingsDropdown<string> dropdown;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audio)
|
||||
{
|
||||
this.audio = audio;
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
|
@ -29,7 +29,9 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
{
|
||||
private bool bounding = true;
|
||||
private LoginForm form;
|
||||
private OsuColour colours;
|
||||
|
||||
[Resolved]
|
||||
private OsuColour colours { get; set; }
|
||||
|
||||
private UserPanel panel;
|
||||
private UserDropdown dropdown;
|
||||
@ -60,10 +62,8 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(permitNulls: true)]
|
||||
private void load(OsuColour colours, IAPIProvider api)
|
||||
private void load(IAPIProvider api)
|
||||
{
|
||||
this.colours = colours;
|
||||
|
||||
api?.Register(this);
|
||||
}
|
||||
|
||||
@ -201,7 +201,9 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
private TextBox username;
|
||||
private TextBox password;
|
||||
private ShakeContainer shakeSignIn;
|
||||
private IAPIProvider api;
|
||||
|
||||
[Resolved]
|
||||
private IAPIProvider api { get; set; }
|
||||
|
||||
public Action RequestHide;
|
||||
|
||||
@ -214,9 +216,8 @@ namespace osu.Game.Overlays.Settings.Sections.General
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader(permitNulls: true)]
|
||||
private void load(IAPIProvider api, OsuConfigManager config, AccountCreationOverlay accountCreation)
|
||||
private void load(OsuConfigManager config, AccountCreationOverlay accountCreation)
|
||||
{
|
||||
this.api = api;
|
||||
Direction = FillDirection.Vertical;
|
||||
Spacing = new Vector2(0, 5);
|
||||
AutoSizeAxes = Axes.Y;
|
||||
|
@ -29,7 +29,9 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
private Bindable<Size> sizeFullscreen;
|
||||
private readonly IBindableList<WindowMode> windowModes = new BindableList<WindowMode>();
|
||||
|
||||
private OsuGameBase game;
|
||||
[Resolved]
|
||||
private OsuGameBase game { get; set; }
|
||||
|
||||
private SettingsDropdown<Size> resolutionDropdown;
|
||||
private SettingsDropdown<WindowMode> windowModeDropdown;
|
||||
|
||||
@ -41,10 +43,8 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
private const int transition_duration = 400;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(FrameworkConfigManager config, OsuConfigManager osuConfig, OsuGameBase game, GameHost host)
|
||||
private void load(FrameworkConfigManager config, OsuConfigManager osuConfig, GameHost host)
|
||||
{
|
||||
this.game = game;
|
||||
|
||||
scalingMode = osuConfig.GetBindable<ScalingMode>(OsuSetting.Scaling);
|
||||
sizeFullscreen = config.GetBindable<Size>(FrameworkSetting.SizeFullscreen);
|
||||
scalingSizeX = osuConfig.GetBindable<float>(OsuSetting.ScalingSizeX);
|
||||
|
@ -24,13 +24,12 @@ namespace osu.Game.Overlays.Settings.Sections
|
||||
private readonly Bindable<SkinInfo> dropdownBindable = new Bindable<SkinInfo> { Default = SkinInfo.Default };
|
||||
private readonly Bindable<int> configBindable = new Bindable<int>();
|
||||
|
||||
private SkinManager skins;
|
||||
[Resolved]
|
||||
private SkinManager skins { get; set; }
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config, SkinManager skins)
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
this.skins = skins;
|
||||
|
||||
FlowContent.Spacing = new Vector2(0, 5);
|
||||
Children = new Drawable[]
|
||||
{
|
||||
|
Reference in New Issue
Block a user