mirror of
https://github.com/ppy/osu.git
synced 2025-02-09 19:02:58 +08:00
Also bind to mod setting changes
This commit is contained in:
parent
9ea15a3961
commit
f9a9ceb41c
@ -50,6 +50,7 @@ namespace osu.Game.Skinning.Components
|
||||
private readonly OsuSpriteText text;
|
||||
private IBindable<StarDifficulty?>? difficultyBindable;
|
||||
private CancellationTokenSource? difficultyCancellationSource;
|
||||
private ModSettingChangeTracker? modSettingTracker;
|
||||
|
||||
public BeatmapAttributeText()
|
||||
{
|
||||
@ -84,7 +85,17 @@ namespace osu.Game.Skinning.Components
|
||||
updateText();
|
||||
}, true);
|
||||
|
||||
mods.BindValueChanged(_ => updateText());
|
||||
mods.BindValueChanged(m =>
|
||||
{
|
||||
modSettingTracker?.Dispose();
|
||||
modSettingTracker = new ModSettingChangeTracker(m.NewValue)
|
||||
{
|
||||
SettingChanged = _ => updateText()
|
||||
};
|
||||
|
||||
updateText();
|
||||
}, true);
|
||||
|
||||
ruleset.BindValueChanged(_ => updateText());
|
||||
|
||||
updateText();
|
||||
|
Loading…
Reference in New Issue
Block a user