Add support for removing colours from palette

This commit is contained in:
Bartłomiej Dach
2021-07-11 20:02:39 +02:00
parent 9a7537cd56
commit 3f005886d6
3 changed files with 81 additions and 44 deletions

View File

@ -92,6 +92,7 @@ namespace osu.Game.Graphics.UserInterfaceV2
});
display.Current.BindValueChanged(colour => Colours[colourIndex] = colour.NewValue);
display.DeleteRequested += colourDeletionRequested;
}
palette.Add(new AddColourButton
@ -102,6 +103,8 @@ namespace osu.Game.Graphics.UserInterfaceV2
reindexItems();
}
private void colourDeletionRequested(ColourDisplay display) => Colours.RemoveAt(palette.IndexOf(display));
private void reindexItems()
{
int index = 1;