You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

39 lines
1.0 KiB

using System;
using UnityEngine;
using UnityEngine.UI;
[Serializable]
public class GraphicNode
{
public Graphic targetGraphic;
public ColorBlock colors;
public GraphicNode(ColorBlock colors)
{
this.colors = colors;
}
public GraphicNode()
{
colors = new ColorBlock()
{
normalColor = new Color(0.6f, 0.6f, 0.6f),
highlightedColor = new Color(0.8f, 0.8f, 0.8f),
pressedColor = new Color(0.9f, 0.9f, 0.9f),
selectedColor = new Color(1f, 1f, 1f),
disabledColor = new Color(0.4f, 0.4f, 0.4f, 0.4f),
fadeDuration = 0.1f
};
}
public static GraphicNode Default => new GraphicNode(new ColorBlock()
{
normalColor = new Color(0.6f, 0.6f, 0.6f),
highlightedColor = new Color(0.8f, 0.8f, 0.8f),
pressedColor = new Color(0.9f, 0.9f, 0.9f),
selectedColor = new Color(1f, 1f, 1f),
disabledColor = new Color(0.4f, 0.4f, 0.4f, 0.4f),
fadeDuration = 0.1f
});
}