Esempio n. 1
0
        private void drawSelectedEvent(Rect rect)
        {
            if (selectedEvent.Id == -1)
            {
                GUI.Label(rect, "No event selected.", styles.EnterPlayModeText);
                return;
            }

            var transform = selectedEvent.IsOpen.Target;
            var path      = selectedEvent.IsOpen.TargetPath;

            GUI.Label(rect, string.Format("{0}\nPosition: {1}\nPrevious: {2}\nFlags: {3}, Buttons: {4}",
                                          getEventString(selectedEventId), selectedEvent.IsOpen.Position,
                                          selectedEvent.IsOpen.PreviousPosition, selectedEvent.IsOpen.Flags,
                                          PointerUtils.ButtonsToString(selectedEvent.IsOpen.Buttons)));
            rect.y     += 64;
            rect.height = 20;
            GUI.Label(rect, "Target: ");
            using (var scope = new EditorGUI.DisabledScope(true))
            {
                var fieldRect = new Rect(rect);
                fieldRect.x     += 50;
                fieldRect.width -= 50;
                EditorGUI.ObjectField(fieldRect, transform, typeof(Transform), true);
            }

            if (path != null)
            {
                rect.y     += 20;
                rect.height = 16;
                GUI.Label(rect, path, styles.SmallText);
            }
        }