mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Fix mod overlay and footer not updating multiplayer on settings change
This commit is contained in:
@ -9,9 +9,11 @@ using osu.Game.Screens.Play.HUD;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osuTK;
|
||||
@ -61,11 +63,22 @@ namespace osu.Game.Screens.Select
|
||||
Hotkey = GlobalAction.ToggleModSelection;
|
||||
}
|
||||
|
||||
[CanBeNull]
|
||||
private ModSettingChangeTracker modSettingChangeTracker;
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
Current.BindValueChanged(_ => updateMultiplierText(), true);
|
||||
Current.BindValueChanged(mods =>
|
||||
{
|
||||
modSettingChangeTracker?.Dispose();
|
||||
|
||||
updateMultiplierText();
|
||||
|
||||
modSettingChangeTracker = new ModSettingChangeTracker(mods.NewValue);
|
||||
modSettingChangeTracker.SettingChanged += _ => updateMultiplierText();
|
||||
}, true);
|
||||
}
|
||||
|
||||
private void updateMultiplierText() => Schedule(() =>
|
||||
|
Reference in New Issue
Block a user