private bool areComboColoursEqual(IHasComboColours a, IHasComboColours b) { // equal to null, no need to SequenceEqual if (a.ComboColours == null && b.ComboColours == null) { return(true); } if (a.ComboColours == null || b.ComboColours == null) { return(false); } return(a.ComboColours.SequenceEqual(b.ComboColours)); }
private static Color4 getComboColour(IHasComboColours source, int colourIndex) => source.ComboColours[colourIndex % source.ComboColours.Count];
protected override IBindable <Color4> GetComboColour(IHasComboColours source, int comboIndex, IHasComboInformation combo) => base.GetComboColour(source, combo.ComboIndexWithOffsets, combo);
protected virtual IBindable <Color4>?GetComboColour(IHasComboColours source, int colourIndex, IHasComboInformation combo) { var colour = source.ComboColours?[colourIndex % source.ComboColours.Count]; return(colour.HasValue ? new Bindable <Color4>(colour.Value) : null); }