public InteractionListLine(Transform transform, int unityId, bool special, int id, int depth, string displayName) : base(id, depth, displayName) { _transform = transform; unitID = unityId; _special = special; if (special) { icon = RowDataHelpers <T> .RowIcon(GetComponent() as Component); } }
protected virtual void OnGUI() { var style = EditorGUIUtility.GetBuiltinSkin(EditorSkin.Inspector).button; style.margin = new RectOffset(2, 2, 1, 2); style.border.left = 3; style.border.right = 3; style.border.bottom = 2; style.border.top = 1; interactionTreeList.OnGUI(new Rect(0, 32, position.width / 3, position.height - 10)); interactionTreeListR.OnGUI(new Rect(position.width * 0.6667f, 32, position.width / 3, position.height)); EditorGUIUtility.DrawColorSwatch(new Rect(position.width / 3, 32, position.width * 0.333333f, position.height), colour); switch (GUILayout.Toolbar(-1, new GUIContent[] { EditorGUIUtility.TrTextContent("<=", "Und davos Left af"), new GUIContent("Cancel", "Und davos annuleren."), new GUIContent(RowDataHelpers <R> .RowIcon(typeof(IConsequence)), ""), GUIContent.none, new GUIContent("AddComponent", "Und davos toevoegen ee"), new GUIContent("Couple", "Und davos linken weer"), EditorGUIUtility.TrTextContent("=>", "Und davos Right af"), }, new bool[] { false, true, true, false, false, true, false }, style, new GUILayoutOption[] { GUILayout.Height(30), GUILayout.ExpandHeight(false) })) { case 1: OnEnable(); break; case 5: linktionary.Link <T, R>(); break; default: //nothing break; } inspector.OnGUI(new Rect(12 + position.width / 3, 44, -24 + position.width / 3, -56 + position.height), selected); }