mirror of
https://github.com/ppy/osu.git
synced 2025-02-10 13:03:01 +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 readonly OsuSpriteText text;
|
||||||
private IBindable<StarDifficulty?>? difficultyBindable;
|
private IBindable<StarDifficulty?>? difficultyBindable;
|
||||||
private CancellationTokenSource? difficultyCancellationSource;
|
private CancellationTokenSource? difficultyCancellationSource;
|
||||||
|
private ModSettingChangeTracker? modSettingTracker;
|
||||||
|
|
||||||
public BeatmapAttributeText()
|
public BeatmapAttributeText()
|
||||||
{
|
{
|
||||||
@ -84,7 +85,17 @@ namespace osu.Game.Skinning.Components
|
|||||||
updateText();
|
updateText();
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
mods.BindValueChanged(_ => updateText());
|
mods.BindValueChanged(m =>
|
||||||
|
{
|
||||||
|
modSettingTracker?.Dispose();
|
||||||
|
modSettingTracker = new ModSettingChangeTracker(m.NewValue)
|
||||||
|
{
|
||||||
|
SettingChanged = _ => updateText()
|
||||||
|
};
|
||||||
|
|
||||||
|
updateText();
|
||||||
|
}, true);
|
||||||
|
|
||||||
ruleset.BindValueChanged(_ => updateText());
|
ruleset.BindValueChanged(_ => updateText());
|
||||||
|
|
||||||
updateText();
|
updateText();
|
||||||
|
Loading…
Reference in New Issue
Block a user