forked from hunterzonewu/unity-decompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDropdownEditor.cs
More file actions
59 lines (55 loc) · 2.37 KB
/
DropdownEditor.cs
File metadata and controls
59 lines (55 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Decompiled with JetBrains decompiler
// Type: UnityEditor.UI.DropdownEditor
// Assembly: UnityEditor.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 02C415E4-CA90-4A5B-B8EB-A397F164EE08
// Assembly location: C:\Users\Blake\shadow-0\Library\UnityAssemblies\UnityEditor.UI.dll
using UnityEngine.UI;
namespace UnityEditor.UI
{
/// <summary>
/// <para>Custom editor for the Dropdown component.</para>
/// </summary>
[CustomEditor(typeof (Dropdown), true)]
[CanEditMultipleObjects]
public class DropdownEditor : SelectableEditor
{
private SerializedProperty m_Template;
private SerializedProperty m_CaptionText;
private SerializedProperty m_CaptionImage;
private SerializedProperty m_ItemText;
private SerializedProperty m_ItemImage;
private SerializedProperty m_OnSelectionChanged;
private SerializedProperty m_Value;
private SerializedProperty m_Options;
protected override void OnEnable()
{
base.OnEnable();
this.m_Template = this.serializedObject.FindProperty("m_Template");
this.m_CaptionText = this.serializedObject.FindProperty("m_CaptionText");
this.m_CaptionImage = this.serializedObject.FindProperty("m_CaptionImage");
this.m_ItemText = this.serializedObject.FindProperty("m_ItemText");
this.m_ItemImage = this.serializedObject.FindProperty("m_ItemImage");
this.m_OnSelectionChanged = this.serializedObject.FindProperty("m_OnValueChanged");
this.m_Value = this.serializedObject.FindProperty("m_Value");
this.m_Options = this.serializedObject.FindProperty("m_Options");
}
/// <summary>
/// <para>See Editor.OnInspectorGUI.</para>
/// </summary>
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
EditorGUILayout.Space();
this.serializedObject.Update();
EditorGUILayout.PropertyField(this.m_Template);
EditorGUILayout.PropertyField(this.m_CaptionText);
EditorGUILayout.PropertyField(this.m_CaptionImage);
EditorGUILayout.PropertyField(this.m_ItemText);
EditorGUILayout.PropertyField(this.m_ItemImage);
EditorGUILayout.PropertyField(this.m_Value);
EditorGUILayout.PropertyField(this.m_Options);
EditorGUILayout.PropertyField(this.m_OnSelectionChanged);
this.serializedObject.ApplyModifiedProperties();
}
}
}