mirror of
https://github.com/ppy/osu
synced 2025-01-04 05:12:10 +00:00
move scrollContent
update logic to updateActiveState()
This commit is contained in:
parent
f4b1264cc9
commit
debbd376bd
@ -129,8 +129,6 @@ namespace osu.Game.Overlays.Mods
|
|||||||
|
|
||||||
selectedMods.BindValueChanged(_ => updateActiveState(), true);
|
selectedMods.BindValueChanged(_ => updateActiveState(), true);
|
||||||
|
|
||||||
scrollContent.ChildrenEnumerable = preset.Mods.Select(mod => new ModPresetRow(mod));
|
|
||||||
|
|
||||||
nameTextBox.Current.BindValueChanged(s =>
|
nameTextBox.Current.BindValueChanged(s =>
|
||||||
{
|
{
|
||||||
editButton.Enabled.Value = !string.IsNullOrWhiteSpace(s.NewValue);
|
editButton.Enabled.Value = !string.IsNullOrWhiteSpace(s.NewValue);
|
||||||
@ -141,12 +139,12 @@ namespace osu.Game.Overlays.Mods
|
|||||||
{
|
{
|
||||||
saveModAfterClosed = selectedMods.Value.ToList();
|
saveModAfterClosed = selectedMods.Value.ToList();
|
||||||
scrollContent.Clear();
|
scrollContent.Clear();
|
||||||
scrollContent.ChildrenEnumerable = saveModAfterClosed.Select(mod => new ModPresetRow(mod));
|
|
||||||
updateActiveState();
|
updateActiveState();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateActiveState()
|
private void updateActiveState()
|
||||||
{
|
{
|
||||||
|
scrollContent.ChildrenEnumerable = preset.Mods.Select(mod => new ModPresetRow(mod));
|
||||||
useCurrentModButton.Enabled.Value = checkCanBeSave();
|
useCurrentModButton.Enabled.Value = checkCanBeSave();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user