Change To OpenGL
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
using Firebird2D.Datatypes;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Firebird2D.DataypesAndInterfaces.Datatypes
|
||||
{
|
||||
public class FirebirdEventId : IEquatable<FirebirdEventId>
|
||||
{
|
||||
public int Value { get; set; }
|
||||
|
||||
public FirebirdEventId(int value) => Value = value;
|
||||
|
||||
public override string ToString() => $"EventId:{Value}";
|
||||
|
||||
public static explicit operator FirebirdEventId(int value) => new(value);
|
||||
|
||||
public static implicit operator int(FirebirdEventId id) => id.Value;
|
||||
|
||||
public static implicit operator FirebirdEventId(FirebirdSystemEventIds e) => new((int)e);
|
||||
|
||||
public static implicit operator FirebirdSystemEventIds(FirebirdEventId id) => (FirebirdSystemEventIds)id.Value;
|
||||
|
||||
public bool Equals(FirebirdEventId? other)
|
||||
{
|
||||
if (other == null) return false;
|
||||
return other.Value == Value;
|
||||
}
|
||||
|
||||
public override bool Equals(object? obj) => obj is FirebirdEventId other && Equals(other);
|
||||
|
||||
public override int GetHashCode() => Value;
|
||||
|
||||
public static bool operator ==(FirebirdEventId left, FirebirdEventId right) => left.Equals(right);
|
||||
public static bool operator !=(FirebirdEventId left, FirebirdEventId right) => !left.Equals(right);
|
||||
|
||||
public static FirebirdEventId operator ++(FirebirdEventId id)
|
||||
{
|
||||
id.Value++;
|
||||
return id;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+8
-1
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Firebird2D.Datatypes
|
||||
{
|
||||
public enum FirebirdEvent
|
||||
public enum FirebirdSystemEventIds
|
||||
{
|
||||
A = 0,
|
||||
//
|
||||
@@ -438,4 +438,11 @@ namespace Firebird2D.Datatypes
|
||||
MouseWheel,
|
||||
MouseMove
|
||||
}
|
||||
|
||||
public static class FirebirdSystemEventInfo
|
||||
{
|
||||
public static readonly FirebirdSystemEventIds MaxValue =
|
||||
Enum.GetValues(typeof(FirebirdSystemEventIds)).Cast<FirebirdSystemEventIds>().Max();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user