summaryrefslogtreecommitdiff
path: root/Assets/UI_Extension/Scripts/Animation/Tween/Editor/TweenAnimationInspector_Alpha.cs
blob: c13e3128e55066a0b35fb029cd7df93fdbb02846 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEditor;
namespace TweenAnimation
{

    public partial class TweenAnimationInspector : Editor
    {
        public void OnInspector_TweenAlpha(TweenModule module)
        {
            OnInspector_Base(module);
            TweenAlpha tween = module as TweenAlpha;

            float alpha = ui.GUIFloat("From", tween.from, "f1");
            alpha = Mathf.Clamp(alpha, 0, 1);
            tween.from = alpha;

            alpha = ui.GUIFloat("To", tween.to, "f1");
            alpha = Mathf.Clamp(alpha, 0, 1);
            tween.to = alpha;

            tween.graphic = ui.GUIObject("Graphic", tween.graphic, typeof(Graphic)) as Graphic;
        }
    }
}