mirror of
https://github.com/ppy/osu
synced 2025-02-10 07:07:53 +00:00
Avoid recreating ModSettingChangeTracker
unless required
This commit is contained in:
parent
b1f6803371
commit
e4fd3b65f4
@ -173,7 +173,7 @@ namespace osu.Game.Rulesets.UI
|
||||
if (value is Mod actualMod)
|
||||
{
|
||||
modSettingsChangeTracker = new ModSettingChangeTracker(new[] { actualMod });
|
||||
modSettingsChangeTracker.SettingChanged = _ => updateMod(actualMod);
|
||||
modSettingsChangeTracker.SettingChanged = _ => updateExtendedInformation();
|
||||
}
|
||||
|
||||
modAcronym.Text = value.Acronym;
|
||||
@ -193,10 +193,14 @@ namespace osu.Game.Rulesets.UI
|
||||
backgroundColour = colours.ForModType(value.Type);
|
||||
updateColour();
|
||||
|
||||
updateExtendedInformation();
|
||||
}
|
||||
|
||||
private void updateExtendedInformation()
|
||||
{
|
||||
bool showExtended = showExtendedInformation && !string.IsNullOrEmpty(mod.ExtendedIconInformation);
|
||||
|
||||
extendedContent.Alpha = showExtended ? 1 : 0;
|
||||
|
||||
extendedText.Text = mod.ExtendedIconInformation;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user