Remember mod selection when re-entering song select

Removes mod application when exiting back to main menu.

Alternative to #1968.
Closes #1961.
This commit is contained in:
Dean Herbert
2018-01-26 19:30:29 +09:00
parent 545a4bd082
commit 7852015db3
5 changed files with 74 additions and 32 deletions

View File

@ -188,17 +188,19 @@ namespace osu.Game.Overlays.Mods
start = Mods.Length - 1;
for (int i = start; i < Mods.Length && i >= 0; i += direction)
{
if (Mods[i].HasImplementation)
{
changeSelectedIndex(i);
return;
}
}
if (SelectAt(i)) return;
Deselect();
}
public bool SelectAt(int index)
{
if (!Mods[index].HasImplementation) return false;
changeSelectedIndex(index);
return true;
}
public void Deselect() => changeSelectedIndex(-1);
private void displayMod(Mod mod)