Files
lllyasviel 72f9f431f4 first
2017-05-14 16:15:52 +08:00

34 lines
778 B
C#

//----------------------------------------------
// NGUI: Next-Gen UI kit
// Copyright © 2011-2015 Tasharen Entertainment
//----------------------------------------------
using UnityEngine;
using UnityEditor;
[CustomEditor(typeof(TweenVolume))]
public class TweenVolumeEditor : UITweenerEditor
{
public override void OnInspectorGUI ()
{
GUILayout.Space(6f);
NGUIEditorTools.SetLabelWidth(120f);
TweenVolume tw = target as TweenVolume;
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();
}
}