summaryrefslogtreecommitdiff
path: root/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/SpriteState.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/SpriteState.cs')
-rw-r--r--Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/SpriteState.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/SpriteState.cs b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/SpriteState.cs
new file mode 100644
index 0000000..c95e146
--- /dev/null
+++ b/Assets/uGUI-2017.1/UnityEngine.UI/UI/Core/Graphics/SpriteState.cs
@@ -0,0 +1,33 @@
+using System;
+using UnityEngine.Serialization;
+
+namespace UnityEngine.UI
+{
+ [Serializable]
+ public struct SpriteState : IEquatable<SpriteState>
+ {
+ [FormerlySerializedAs("highlightedSprite")]
+ [FormerlySerializedAs("m_SelectedSprite")]
+ [SerializeField]
+ private Sprite m_HighlightedSprite;
+
+ [FormerlySerializedAs("pressedSprite")]
+ [SerializeField]
+ private Sprite m_PressedSprite;
+
+ [FormerlySerializedAs("disabledSprite")]
+ [SerializeField]
+ private Sprite m_DisabledSprite;
+
+ public Sprite highlightedSprite { get { return m_HighlightedSprite; } set { m_HighlightedSprite = value; } }
+ public Sprite pressedSprite { get { return m_PressedSprite; } set { m_PressedSprite = value; } }
+ public Sprite disabledSprite { get { return m_DisabledSprite; } set { m_DisabledSprite = value; } }
+
+ public bool Equals(SpriteState other)
+ {
+ return highlightedSprite == other.highlightedSprite &&
+ pressedSprite == other.pressedSprite &&
+ disabledSprite == other.disabledSprite;
+ }
+ }
+}