mirror of
https://github.com/lllyasviel/YGOProUnity_V2.git
synced 2026-10-20 07:59:06 +08:00
34 lines
774 B
C#
34 lines
774 B
C#
//----------------------------------------------
|
|
// NGUI: Next-Gen UI kit
|
|
// Copyright © 2011-2015 Tasharen Entertainment
|
|
//----------------------------------------------
|
|
|
|
using UnityEngine;
|
|
using UnityEditor;
|
|
|
|
[CustomEditor(typeof(TweenAlpha))]
|
|
public class TweenAlphaEditor : UITweenerEditor
|
|
{
|
|
public override void OnInspectorGUI ()
|
|
{
|
|
GUILayout.Space(6f);
|
|
NGUIEditorTools.SetLabelWidth(120f);
|
|
|
|
TweenAlpha tw = target as TweenAlpha;
|
|
GUI.changed = false;
|
|
|
|
float from = EditorGUILayout.Slider("From", tw.from, 0f, 1f);
|
|
float to = EditorGUILayout.Slider("To", tw.to, 0f, 1f);
|
|
|
|
if (GUI.changed)
|
|
{
|
|
NGUIEditorTools.RegisterUndo("Tween Change", tw);
|
|
tw.from = from;
|
|
tw.to = to;
|
|
NGUITools.SetDirty(tw);
|
|
}
|
|
|
|
DrawCommonProperties();
|
|
}
|
|
}
|