Skip to content

Commit

Permalink
ColorId is comparable
Browse files Browse the repository at this point in the history
  • Loading branch information
MikiraSora committed Aug 29, 2024
1 parent 46c665c commit 7fad74a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 755 deletions.
33 changes: 23 additions & 10 deletions OngekiFumenEditor/Base/OngekiObjects/ColorId.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
using System.Windows.Media;
using System.Numerics;
using System.Windows.Media;

namespace OngekiFumenEditor.Base.OngekiObjects
namespace OngekiFumenEditor.Base.OngekiObjects;

public struct ColorId : IEqualityOperators<ColorId, ColorId, bool>
{
public struct ColorId
{
public int Id { get; set; }
public string Name { get; set; }
public Color Color { get; set; }

public override string ToString() => $"{Id} {Name}";
}
public int Id { get; set; }
public string Name { get; set; }
public Color Color { get; set; }

public override string ToString()
{
return $"{Id} {Name}";
}

public static bool operator ==(ColorId left, ColorId right)
{
return left.Id == right.Id;
}

public static bool operator !=(ColorId left, ColorId right)
{
return !(left == right);
}
}
Loading

0 comments on commit 7fad74a

Please sign in to comment.