mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 21:02:55 +08:00
Make OsuUserInputManager
dependency nullable for tournament client
This commit is contained in:
parent
7a6ecaff0d
commit
6199db11a2
@ -47,7 +47,7 @@ namespace osu.Game.Graphics.Cursor
|
||||
}
|
||||
|
||||
[Resolved]
|
||||
private OsuUserInputManager inputManager { get; set; } = null!;
|
||||
private OsuUserInputManager? inputManager { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private OsuGame? game { get; set; }
|
||||
@ -63,8 +63,11 @@ namespace osu.Game.Graphics.Cursor
|
||||
|
||||
internalState.ValueChanged += onInternalStateChanged;
|
||||
|
||||
mouseInputSource.BindTo(inputManager.IsMouseInputSource);
|
||||
mouseInputSource.BindValueChanged(_ => updateInternalVisibility(), true);
|
||||
if (inputManager != null)
|
||||
{
|
||||
mouseInputSource.BindTo(inputManager.IsMouseInputSource);
|
||||
mouseInputSource.BindValueChanged(_ => updateInternalVisibility(), true);
|
||||
}
|
||||
|
||||
if (game != null)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user