using System;
using UnityEngine.Serialization;
namespace UnityEngine.UI
{
[Serializable]
///
/// Structure that stores the state of a sprite transition on a Selectable.
///
public struct SpriteState : IEquatable
{
[SerializeField]
private Sprite m_HighlightedSprite;
[SerializeField]
private Sprite m_PressedSprite;
[FormerlySerializedAs("m_HighlightedSprite")]
[SerializeField]
private Sprite m_SelectedSprite;
[SerializeField]
private Sprite m_DisabledSprite;
///
/// Highlighted sprite.
///
public Sprite highlightedSprite { get { return m_HighlightedSprite; } set { m_HighlightedSprite = value; } }
///
/// Pressed sprite.
///
public Sprite pressedSprite { get { return m_PressedSprite; } set { m_PressedSprite = value; } }
///
/// Selected sprite.
///
public Sprite selectedSprite { get { return m_SelectedSprite; } set { m_SelectedSprite = value; } }
///
/// Disabled sprite.
///
public Sprite disabledSprite { get { return m_DisabledSprite; } set { m_DisabledSprite = value; } }
public bool Equals(SpriteState other)
{
return highlightedSprite == other.highlightedSprite &&
pressedSprite == other.pressedSprite &&
selectedSprite == other.selectedSprite &&
disabledSprite == other.disabledSprite;
}
}
}