Tidy up variables a bit

This commit is contained in:
Dean Herbert 2017-11-14 18:53:09 +09:00
parent 160b988735
commit f96f7e696d
1 changed files with 8 additions and 8 deletions

View File

@ -17,7 +17,7 @@ public class PaginatedBeatmapContainer : PaginatedContainer
private readonly BeatmapSetType type;
private DirectPanel playing;
private DirectPanel currentlyPlaying;
public PaginatedBeatmapContainer(BeatmapSetType type, Bindable<User> user, string header, string missing)
: base(user, header, missing)
@ -55,14 +55,14 @@ protected override void ShowMore()
var panel = new DirectGridPanel(s.ToBeatmapSet(Rulesets)) { Width = 400 };
ItemsContainer.Add(panel);
panel.PreviewPlaying.ValueChanged += newValue =>
panel.PreviewPlaying.ValueChanged += isPlaying =>
{
if (newValue)
{
if (playing != null && playing != panel)
playing.PreviewPlaying.Value = false;
playing = panel;
}
if (!isPlaying) return;
if (currentlyPlaying != null && currentlyPlaying != panel)
currentlyPlaying.PreviewPlaying.Value = false;
currentlyPlaying = panel;
};
}
};