From 0e63c4a2c6dec8dfa260501fb7d73750261ea7b7 Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Sat, 25 Nov 2023 18:39:02 +0800 Subject: + init --- Assembly_Firstpass/Steamworks/ScreenshotHandle.cs | 65 +++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Assembly_Firstpass/Steamworks/ScreenshotHandle.cs (limited to 'Assembly_Firstpass/Steamworks/ScreenshotHandle.cs') diff --git a/Assembly_Firstpass/Steamworks/ScreenshotHandle.cs b/Assembly_Firstpass/Steamworks/ScreenshotHandle.cs new file mode 100644 index 0000000..6e32e44 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ScreenshotHandle.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct ScreenshotHandle : IEquatable, IComparable +{ + public static readonly ScreenshotHandle Invalid = new ScreenshotHandle(0u); + + public uint m_ScreenshotHandle; + + public ScreenshotHandle(uint value) + { + m_ScreenshotHandle = value; + } + + public override string ToString() + { + return m_ScreenshotHandle.ToString(); + } + + public override bool Equals(object other) + { + if (other is ScreenshotHandle) + { + return this == (ScreenshotHandle)other; + } + return false; + } + + public override int GetHashCode() + { + return m_ScreenshotHandle.GetHashCode(); + } + + public static bool operator ==(ScreenshotHandle x, ScreenshotHandle y) + { + return x.m_ScreenshotHandle == y.m_ScreenshotHandle; + } + + public static bool operator !=(ScreenshotHandle x, ScreenshotHandle y) + { + return !(x == y); + } + + public static explicit operator ScreenshotHandle(uint value) + { + return new ScreenshotHandle(value); + } + + public static explicit operator uint(ScreenshotHandle that) + { + return that.m_ScreenshotHandle; + } + + public bool Equals(ScreenshotHandle other) + { + return m_ScreenshotHandle == other.m_ScreenshotHandle; + } + + public int CompareTo(ScreenshotHandle other) + { + return m_ScreenshotHandle.CompareTo(other.m_ScreenshotHandle); + } +} -- cgit v1.1-26-g67d0