diff options
Diffstat (limited to 'Assets/UI_Extension/Scripts/Animation/Tween/Editor/TweenAnimationInspector.cs')
-rw-r--r-- | Assets/UI_Extension/Scripts/Animation/Tween/Editor/TweenAnimationInspector.cs | 66 |
1 files changed, 12 insertions, 54 deletions
diff --git a/Assets/UI_Extension/Scripts/Animation/Tween/Editor/TweenAnimationInspector.cs b/Assets/UI_Extension/Scripts/Animation/Tween/Editor/TweenAnimationInspector.cs index f98c47d..e0f2b9a 100644 --- a/Assets/UI_Extension/Scripts/Animation/Tween/Editor/TweenAnimationInspector.cs +++ b/Assets/UI_Extension/Scripts/Animation/Tween/Editor/TweenAnimationInspector.cs @@ -9,66 +9,24 @@ namespace TweenAnimation [CustomEditor(typeof(TweenAnimation), false)]
public partial class TweenAnimationInspector : Editor
{
-
-
- public override void OnInspectorGUI()
+ private TweenModuleGUIStyles styles
{
- TweenAnimation tween = target as TweenAnimation;
-
- EditorGUILayout.LabelField("Tween Alpha", TweenModuleGUIStyles.Get().moduleHeaderStyle);
- // GUILayout.Button("button", "ProfilerBadge");
- //DrawProObjectField<TweenAnimation>(new GUIContent(""), tween, typeof(TweenAnimation), TweenModuleGUIStyles.Get().objectField, false);
-
- Rect rect = GUILayoutUtility.GetRect(100, 25f);
-
- bool result = GUI.Toggle(rect, true, "content", TweenModuleGUIStyles.Get().moduleHeaderStyle);
- rect = GUILayoutUtility.GetRect(100, 25f);
-
- GUI.Button(rect, "", "OL Plus");
- rect.y += 20;
- GUI.Button(rect, "", "OL Minus");
- }
- public static void DrawProObjectField<T>(
- GUIContent label,
- SerializedProperty value,
- Type objType,
- GUIStyle style,
- bool allowSceneObjects,
- Texture objIcon = null,
- params GUILayoutOption[] options) where T : UnityEngine.Object
- {
-
- T tObj = value.objectReferenceValue as T;
-
- if (objIcon == null)
- {
- objIcon = EditorGUIUtility.FindTexture("PrefabNormal Icon");
- }
- style.imagePosition = ImagePosition.ImageLeft;
-
- int pickerID = 455454425;
-
- if (tObj != null)
+ get
{
- EditorGUILayout.LabelField(label,
- new GUIContent(tObj.name, objIcon), style, options);
+ return TweenModuleGUIStyles.Get();
}
+ }
- if (GUILayout.Button("Select"))
- {
- EditorGUIUtility.ShowObjectPicker<T>(
- tObj, allowSceneObjects, "", pickerID);
+ public void Awake()
+ {
+ }
- }
- if (Event.current.commandName == "ObjectSelectorUpdated")
- {
- if (EditorGUIUtility.GetObjectPickerControlID() == pickerID)
- {
- tObj = EditorGUIUtility.GetObjectPickerObject() as T;
- value.objectReferenceValue = tObj;
- }
- }
+ public override void OnInspectorGUI()
+ {
+ TweenAnimation tween = target as TweenAnimation;
+ GUILayout.Label("content", styles.editableLabel);
+ GUILayout.Label("content", styles.editableLabel);
}
}
|