mirror of
https://github.com/lllyasviel/YGOProUnity_V2.git
synced 2026-10-19 23:45:38 +08:00
36 lines
872 B
C#
36 lines
872 B
C#
//----------------------------------------------
|
|
// NGUI: Next-Gen UI kit
|
|
// Copyright © 2011-2015 Tasharen Entertainment
|
|
//----------------------------------------------
|
|
|
|
using UnityEngine;
|
|
using UnityEditor;
|
|
|
|
[CustomEditor(typeof(TweenScale))]
|
|
public class TweenScaleEditor : UITweenerEditor
|
|
{
|
|
public override void OnInspectorGUI ()
|
|
{
|
|
GUILayout.Space(6f);
|
|
NGUIEditorTools.SetLabelWidth(120f);
|
|
|
|
TweenScale tw = target as TweenScale;
|
|
GUI.changed = false;
|
|
|
|
Vector3 from = EditorGUILayout.Vector3Field("From", tw.from);
|
|
Vector3 to = EditorGUILayout.Vector3Field("To", tw.to);
|
|
bool table = EditorGUILayout.Toggle("Update Table", tw.updateTable);
|
|
|
|
if (GUI.changed)
|
|
{
|
|
NGUIEditorTools.RegisterUndo("Tween Change", tw);
|
|
tw.from = from;
|
|
tw.to = to;
|
|
tw.updateTable = table;
|
|
NGUITools.SetDirty(tw);
|
|
}
|
|
|
|
DrawCommonProperties();
|
|
}
|
|
}
|