【m】1111
This commit is contained in:
33
Assets/06.UIFarme/Editor/Tweening/TweenOrthoSizeEditor.cs
Normal file
33
Assets/06.UIFarme/Editor/Tweening/TweenOrthoSizeEditor.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
#if UNITY_EDITOR
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
[CustomEditor(typeof(TweenOrthoSize))]
|
||||
public class TweenOrthoSizeEditor : UITweenerEditor
|
||||
{
|
||||
public override void OnInspectorGUI ()
|
||||
{
|
||||
GUILayout.Space(6f);
|
||||
EditorGUIUtility.labelWidth = 120f;
|
||||
|
||||
TweenOrthoSize tw = target as TweenOrthoSize;
|
||||
GUI.changed = false;
|
||||
|
||||
float from = EditorGUILayout.FloatField("From", tw.from);
|
||||
float to = EditorGUILayout.FloatField("To", tw.to);
|
||||
|
||||
if (from < 0f) from = 0f;
|
||||
if (to < 0f) to = 0f;
|
||||
|
||||
if (GUI.changed)
|
||||
{
|
||||
//NGUIEditorTools.RegisterUndo("Tween Change", tw);
|
||||
tw.from = from;
|
||||
tw.to = to;
|
||||
//NGUITools.SetDirty(tw);
|
||||
}
|
||||
|
||||
DrawCommonProperties();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user