Add tests for (and fix) removal of last item in carousel

This commit is contained in:
Dean Herbert
2017-12-16 00:33:09 +09:00
parent fd9d900ae0
commit a8a2c233a0
5 changed files with 69 additions and 9 deletions

View File

@ -19,7 +19,7 @@ namespace osu.Game.Screens.Select.Carousel
public override void AddChild(CarouselItem i)
{
i.State.ValueChanged += v => itemStateChanged(i, v);
i.State.ValueChanged += v => ItemStateChanged(i, v);
base.AddChild(i);
}
@ -28,7 +28,7 @@ namespace osu.Game.Screens.Select.Carousel
if (items != null) InternalChildren = items;
}
private void itemStateChanged(CarouselItem item, CarouselItemState value)
protected virtual void ItemStateChanged(CarouselItem item, CarouselItemState value)
{
// todo: check state of selected item.