private static void DrawMessage(OSCMessage message) { if (message != null) { EditorGUILayout.LabelField(_addressContent, EditorStyles.boldLabel); EditorGUILayout.BeginVertical("box"); EditorGUILayout.SelectableLabel(message.Address, GUILayout.Height(EditorGUIUtility.singleLineHeight)); EditorGUILayout.EndVertical(); if (message.Values.Count > 0) { EditorGUILayout.LabelField(string.Format("Values ({0}):", message.GetTags()), EditorStyles.boldLabel); EditorGUILayout.BeginVertical(); foreach (var value in message.Values) { DrawValue(value); } EditorGUILayout.EndVertical(); } } }
private void DrawMessage(OSCMessage message) { var removeValue = (OSCValue)null; EditorGUILayout.LabelField(_addressContent, EditorStyles.boldLabel); using (new GUILayout.VerticalScope(OSCEditorStyles.Box)) { message.Address = EditorGUILayout.TextField(message.Address, GUILayout.MaxHeight(EditorGUIUtility.singleLineHeight)); } EditorGUILayout.LabelField(string.Format("Values ({0}):", message.GetTags()), EditorStyles.boldLabel); using (new GUILayout.VerticalScope()) { foreach (var value in message.Values) { DrawValue(value, ref removeValue); } } var includeValue = CreateValueButton(message); // ACTIONS if (removeValue != null) { message.Values.Remove(removeValue); } if (includeValue != null) { message.AddValue(includeValue); } }
private static void DrawEditableMessage(OSCMessage message) { EditorGUILayout.LabelField(_addressContent, EditorStyles.boldLabel); EditorGUILayout.BeginVertical("box"); message.Address = EditorGUILayout.TextField(message.Address, GUILayout.MaxHeight(EditorGUIUtility.singleLineHeight)); EditorGUILayout.EndVertical(); OSCValue removeValue = null; EditorGUILayout.LabelField(string.Format("Values ({0}):", message.GetTags()), EditorStyles.boldLabel); EditorGUILayout.BeginVertical(); foreach (var value in message.Values) { DrawEditableValue(value, ref removeValue); } EditorGUILayout.EndVertical(); var includeValue = CreateValueButton(message); if (removeValue != null) { message.Values.Remove(removeValue); } if (includeValue != null) { message.AddValue(includeValue); } }
private void DrawMessage(OSCMessage message) { if (message != null) { EditorGUILayout.LabelField(_addressContent, EditorStyles.boldLabel); using (new GUILayout.VerticalScope(OSCEditorStyles.Box)) { EditorGUILayout.SelectableLabel(message.Address, GUILayout.Height(EditorGUIUtility.singleLineHeight)); } if (message.Values.Count > 0) { EditorGUILayout.LabelField(string.Format("Values ({0}):", message.GetTags()), EditorStyles.boldLabel); using (new GUILayout.VerticalScope()) { foreach (var value in message.Values) { DrawValue(value); } } } } }