public override void OnInspectorGUI() { _defaultColor = GUI.color; GUILayout.Space(10); OSCEditorLayout.DrawLogo(); GUILayout.Space(10); GUILayout.BeginVertical("box"); var openButton = GUILayout.Button(_openButton, GUILayout.Height(40)); if (openButton) { OSCWindowMapping.OpenBundle((OSCMapBundle)target); } GUILayout.EndVertical(); GUILayout.BeginVertical(); if (_bundle.Messages.Count > 0) { foreach (var message in _bundle.Messages) { GUILayout.BeginVertical("box"); GUILayout.BeginVertical("box"); EditorGUILayout.LabelField("Address: " + message.Address, EditorStyles.boldLabel); GUILayout.EndVertical(); foreach (var value in message.Values) { DrawValue(value); } GUILayout.EndVertical(); } } else { EditorGUILayout.BeginHorizontal("box"); GUILayout.Label(_emptyBundleContent, OSCEditorStyles.CenterLabel, GUILayout.Height(40)); EditorGUILayout.EndHorizontal(); } GUILayout.EndVertical(); }
public override void OnInspectorGUI() { OSCEditorInterface.LogoLayout(); using (new EditorGUILayout.VerticalScope(OSCEditorStyles.Box)) { var openButton = GUILayout.Button(_openButton, GUILayout.Height(40)); if (openButton) { OSCWindowMapping.OpenBundle(_bundle); } } using (new EditorGUILayout.VerticalScope()) { if (_bundle.Messages.Count > 0) { var index = 0; foreach (var message in _bundle.Messages) { var types = message.Values.Select(v => v.Type.ToString()); using (new EditorGUILayout.HorizontalScope(OSCEditorStyles.Box)) { using (new EditorGUILayout.VerticalScope(OSCEditorStyles.Box)) { EditorGUILayout.LabelField((++index).ToString(), OSCEditorStyles.CenterBoldLabel, GUILayout.Width(40)); } using (new EditorGUILayout.VerticalScope(OSCEditorStyles.Box)) { EditorGUILayout.LabelField($"{message.Address} {string.Join(", ", types)}"); } } } } else { using (new EditorGUILayout.HorizontalScope(OSCEditorStyles.Box)) { GUILayout.Label(_emptyBundleContent, OSCEditorStyles.CenterLabel, GUILayout.Height(40)); } } } }
public static void ShowMapping() { OSCWindowMapping.Open(); }