-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathChannelSelectionWidgetEditor.cs
More file actions
35 lines (28 loc) · 1.35 KB
/
Copy pathChannelSelectionWidgetEditor.cs
File metadata and controls
35 lines (28 loc) · 1.35 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
using UnityEngine;
using UnityEditor;
namespace OpenTibiaUnityEditor.Modules.Console
{
[CustomEditor(typeof(OpenTibiaUnity.Modules.Console.ChannelSelectionWidget), true)]
[CanEditMultipleObjects]
public class ChannelSelectionWidgetEditor : UI.Legacy.PopUpBaseEditor
{
SerializedProperty _channelScrollRect;
SerializedProperty _channelInput;
SerializedProperty _channelToggleGroup;
protected override void OnEnable() {
base.OnEnable();
_channelScrollRect = serializedObject.FindProperty("_channelScrollRect");
_channelInput = serializedObject.FindProperty("_channelInput");
_channelToggleGroup = serializedObject.FindProperty("_channelToggleGroup");
}
public override void OnInspectorGUI() {
base.OnInspectorGUI();
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
EditorGUILayout.LabelField("Channel Selection Widget", EditorStyles.boldLabel);
EditorGUILayout.PropertyField(_channelScrollRect, new GUIContent("Channel ScrollRect"));
EditorGUILayout.PropertyField(_channelInput, new GUIContent("Channel Input"));
EditorGUILayout.PropertyField(_channelToggleGroup, new GUIContent("Channel ToggleGroup"));
serializedObject.ApplyModifiedProperties();
}
}
}