コード例 #1
0
 private void OnExecuteCommand(ExecuteCommandEvent evt)
 {
     if (evt.commandName == "ObjectSelectorClosed" && addItemField != null)
     {
         UnityEngine.Object addItem = addItemField.value;
         if (addItem != null)
         {
             if (CanBeAdded?.Invoke(addItem) ?? true)
             {
                 if (AddItemAction != null)
                 {
                     AddItemAction(addItem);
                     serializedProperty.serializedObject.Update();
                     UpdateListViewSize();
                 }
                 else
                 {
                     Undo.RecordObject(serializedProperty.serializedObject.targetObject, "Remove item");
                     int newItemIndex = serializedProperty.arraySize;
                     serializedProperty.InsertArrayElementAtIndex(newItemIndex);
                     SerializedProperty itemProperty = serializedProperty.GetArrayElementAtIndex(newItemIndex);
                     itemProperty.objectReferenceValue = addItemField.value;
                     serializedProperty.serializedObject.Update();
                     UpdateListViewSize();
                 }
             }
             addItemField.value = null;
         }
     }
 }
コード例 #2
0
 void OnExecuteCommand(ExecuteCommandEvent evt)
 {
     if (evt.commandName == "Copy")
     {
         CopyFullText();
     }
 }
コード例 #3
0
        public override void ExecuteDefaultActionAtTarget(EventBase evt)
        {
            base.ExecuteDefaultActionAtTarget(evt);

            if (evt.GetEventTypeId() == MouseDownEvent.TypeId())
            {
                OnMouseDown(evt as MouseDownEvent);
            }
            else if (evt.GetEventTypeId() == MouseUpEvent.TypeId())
            {
                OnMouseUp(evt as MouseUpEvent);
            }
            else if (evt.GetEventTypeId() == MouseMoveEvent.TypeId())
            {
                OnMouseMove(evt as MouseMoveEvent);
            }
            else if (evt.GetEventTypeId() == KeyDownEvent.TypeId())
            {
                OnKeyDown(evt as KeyDownEvent);
            }
            else if (evt.GetEventTypeId() == ValidateCommandEvent.TypeId())
            {
                OnValidateCommandEvent(evt as ValidateCommandEvent);
            }
            else if (evt.GetEventTypeId() == ExecuteCommandEvent.TypeId())
            {
                OnExecuteCommandEvent(evt as ExecuteCommandEvent);
            }
        }
        public IEnumerator DuplicateNodeAndEdgeCreatesEdgeToOriginalNode()
        {
            var declaration0 = GraphModel.CreateGraphVariableDeclaration(typeof(int).GenerateTypeHandle(), "decl0", ModifierFlags.None, true);

            var nodeA = GraphModel.CreateVariableNode(declaration0, new Vector2(100, -100));
            var nodeB = GraphModel.CreateNode <Type0FakeNodeModel>("A", new Vector2(100, 100));

            var edge = GraphModel.CreateEdge(nodeB.Input0, nodeA.OutputPort) as EdgeModel;

            MarkGraphViewStateDirty();
            yield return(null);

            CommandDispatcher.Dispatch(new SelectElementsCommand(SelectElementsCommand.SelectionMode.Replace, new GraphElementModel[] { nodeB, edge }));

            GraphView.Focus();
            using (var evt = ExecuteCommandEvent.GetPooled("Duplicate"))
            {
                evt.target = GraphView;
                GraphView.SendEvent(evt);
            }
            yield return(null);

            Assert.AreEqual(3, GraphModel.NodeModels.Count);
            Assert.AreEqual(2, GraphModel.EdgeModels.Count);
            foreach (var edgeModel in GraphModel.EdgeModels)
            {
                Assert.AreEqual(nodeA.OutputPort, edgeModel.FromPort);
            }
        }
コード例 #5
0
 void ActivateSearchBar(ExecuteCommandEvent evt)
 {
     Debug.Log(evt.commandName);
     if (evt.commandName == "Find")
     {
         m_SearchBar.Focus();
     }
 }
コード例 #6
0
 private void OnExecuteCommandEvent(ExecuteCommandEvent evt)
 {
     if (evt.commandName == EventCommandNames.Find)
     {
         packageManagerToolbar.FocusOnSearch();
         evt.StopPropagation();
     }
 }
コード例 #7
0
 void ProcessMenuCommand(string command)
 {
     using (ExecuteCommandEvent evt = ExecuteCommandEvent.GetPooled(command))
     {
         evt.target = this;
         SendEvent(evt);
     }
 }
コード例 #8
0
        public static void SendDeleteCommand(
            EditorWindow parentWindow,
            VisualElement elementToNotify)
        {
            var deleteCommand = new ExecuteCommandEvent();

            deleteCommand.SetNonPrivateProperty("commandName", "SoftDelete");
            elementToNotify.InvokePrivateFunc("OnExecuteCommand", new object[] { deleteCommand });
        }
コード例 #9
0
        // In order for tests to run without an EditorWindow but still be able to send
        // events, we sometimes need to force the event type. IMGUI::GetEventType() (native) will
        // return the event type as Ignore if the proper views haven't yet been
        // initialized. This (falsely) breaks tests that rely on the event type. So for tests, we
        // just ensure the event type is what we originally set it to when we sent it.
        internal static EventBase CreateEvent(Event systemEvent, EventType eventType)
        {
            switch (eventType)
            {
            case EventType.MouseMove:
                return(MouseMoveEvent.GetPooled(systemEvent));

            case EventType.MouseDrag:
                return(MouseMoveEvent.GetPooled(systemEvent));

            case EventType.MouseDown:
                return(MouseDownEvent.GetPooled(systemEvent));

            case EventType.MouseUp:
                return(MouseUpEvent.GetPooled(systemEvent));

            case EventType.ContextClick:
                return(ContextClickEvent.GetPooled(systemEvent));

            case EventType.MouseEnterWindow:
                return(MouseEnterWindowEvent.GetPooled(systemEvent));

            case EventType.MouseLeaveWindow:
                return(MouseLeaveWindowEvent.GetPooled(systemEvent));

            case EventType.ScrollWheel:
                return(WheelEvent.GetPooled(systemEvent));

            case EventType.KeyDown:
                return(KeyDownEvent.GetPooled(systemEvent));

            case EventType.KeyUp:
                return(KeyUpEvent.GetPooled(systemEvent));

            case EventType.DragUpdated:
                return(DragUpdatedEvent.GetPooled(systemEvent));

            case EventType.DragPerform:
                return(DragPerformEvent.GetPooled(systemEvent));

            case EventType.DragExited:
                return(DragExitedEvent.GetPooled(systemEvent));

            case EventType.ValidateCommand:
                return(ValidateCommandEvent.GetPooled(systemEvent));

            case EventType.ExecuteCommand:
                return(ExecuteCommandEvent.GetPooled(systemEvent));

            default:    // Layout, Ignore, Used
                return(IMGUIEvent.GetPooled(systemEvent));
            }
        }
コード例 #10
0
    // check https://github.com/Unity-Technologies/UnityCsReference/blob/2019.4/Modules/GraphViewEditor/Views/GraphView.cs#L946
    private void OnExecuteCommandTemp(ExecuteCommandEvent evt)
    {
        if (panel.GetCapturingElement(PointerId.mousePointerId) != null)
        {
            return;
        }

        if (evt.commandName == GraphUtil.EventCommandNames.Copy)
        {
            CopySelectionCallback();
            evt.StopPropagation();
        }
        else if (evt.commandName == GraphUtil.EventCommandNames.Paste)
        {
            PasteCallback();
            evt.StopPropagation();
        }
        else if (evt.commandName == GraphUtil.EventCommandNames.Duplicate)
        {
            // DuplicateSelectionCallback();
            Debug.Log("wanna duplicate");
            evt.StopPropagation();
        }
        else if (evt.commandName == GraphUtil.EventCommandNames.Cut)
        {
            CutSelectionCallback();
            evt.StopPropagation();
        }
        else if (evt.commandName == GraphUtil.EventCommandNames.Delete)
        {
            DeleteSelectionCallback(AskUser.DontAskUser);
            evt.StopPropagation();
        }
        else if (evt.commandName == GraphUtil.EventCommandNames.SoftDelete)
        {
            DeleteSelectionCallback(AskUser.AskUser);
            evt.StopPropagation();
        }
        else if (evt.commandName == GraphUtil.EventCommandNames.FrameSelected)
        {
            FrameSelection();
            evt.StopPropagation();
        }
        else if (evt.commandName == GraphUtil.EventCommandNames.UndoRedoPerformed)
        {
            evt.StopPropagation();
        }

        if (evt.isPropagationStopped && evt.imguiEvent != null)
        {
            evt.imguiEvent.Use();
        }
    }
コード例 #11
0
 void OnExecuteCommand(ExecuteCommandEvent evt)
 {
     if (MouseCaptureController.IsMouseCaptured())
     {
         return;
     }
     if (evt.commandName == "Find")
     {
         OnSearchInGraph();
         evt.StopPropagation();
     }
 }
コード例 #12
0
        public static void SendDeleteCommand(
            EditorWindow parentWindow,
            VisualElement elementToNotify)
        {
            var deleteCommand = new ExecuteCommandEvent();

            deleteCommand.SetNonPrivateProperty("commandName", "Delete");
            if (parentWindow is MaterialGraphEditWindow materialGraphEditWindow)
            {
                var graphView = materialGraphEditWindow.graphEditorView.graphView;
                graphView.InvokePrivateFunc("OnExecuteCommand", new object[] { deleteCommand });
            }
        }
コード例 #13
0
        public static void Compile(this GraphElement element)
        {
            var evt = new Event()
            {
                type        = EventType.ExecuteCommand,
                commandName = UdonGraphCommands.Compile
            };

            using (var e = ExecuteCommandEvent.GetPooled(evt))
            {
                element.SendEvent(e);
            }
        }
コード例 #14
0
        internal static void PickObject(ExecuteCommandEvent evt)
        {
            if (evt.commandName != "ObjectSelectorClosed" && !WasPicked)
            {
                return;
            }

            var pickedObject = EditorGUIUtility.GetObjectPickerObject();

            if (pickedObject != null)
            {
                PickedObject = pickedObject;
            }
        }
コード例 #15
0
        public static void SaveNewData(this GraphElement element)
        {
            var evt = new Event()
            {
                type        = EventType.ExecuteCommand,
                commandName = UdonGraphCommands.SaveNewData
            };

            using (var e = ExecuteCommandEvent.GetPooled(evt))
            {
                element.SendEvent(e);
            }

            MarkDirty();
        }
コード例 #16
0
        public static void Reserialize(this GraphElement element)
        {
            MarkDirty();

            var evt = new Event()
            {
                type        = EventType.ExecuteCommand,
                commandName = UdonGraphCommands.Reserialize,
            };

            using (var e = ExecuteCommandEvent.GetPooled(evt))
            {
                element.SendEvent(e);
            }
        }
コード例 #17
0
        void OnExecuteCommand(ExecuteCommandEvent evt)
        {
            if (MouseCaptureController.IsMouseCaptureTaken())
            {
                return;
            }

            if (evt.commandName == EventCommandNames.Copy)
            {
                CopySelectionCallback();
                evt.StopPropagation();
            }
            else if (evt.commandName == EventCommandNames.Paste)
            {
                PasteCallback();
                evt.StopPropagation();
            }
            else if (evt.commandName == EventCommandNames.Duplicate)
            {
                DuplicateSelectionCallback();
                evt.StopPropagation();
            }
            else if (evt.commandName == EventCommandNames.Cut)
            {
                CutSelectionCallback();
                evt.StopPropagation();
            }
            else if (evt.commandName == EventCommandNames.Delete)
            {
                DeleteSelectionCallback(AskUser.DontAskUser);
                evt.StopPropagation();
            }
            else if (evt.commandName == EventCommandNames.SoftDelete)
            {
                DeleteSelectionCallback(AskUser.AskUser);
                evt.StopPropagation();
            }
            else if (evt.commandName == EventCommandNames.FrameSelected)
            {
                FrameSelection();
                evt.StopPropagation();
            }

            if (evt.isPropagationStopped && evt.imguiEvent != null)
            {
                evt.imguiEvent.Use();
            }
        }
コード例 #18
0
        internal void OnExecuteCommand(ExecuteCommandEvent evt)
        {
            if (panel.GetCapturingElement(PointerId.mousePointerId) != null)
            {
                return;
            }

            if (evt.commandName == EventCommandNames.Copy)
            {
                CopySelectionCallback();
                evt.StopPropagation();
            }
            else if (evt.commandName == EventCommandNames.Paste)
            {
                PasteCallback();
                evt.StopPropagation();
            }
            else if (evt.commandName == EventCommandNames.Duplicate)
            {
                DuplicateSelectionCallback();
                evt.StopPropagation();
            }
            else if (evt.commandName == EventCommandNames.Cut)
            {
                CutSelectionCallback();
                evt.StopPropagation();
            }
            else if (evt.commandName == EventCommandNames.Delete)
            {
                DeleteSelection();
                evt.StopPropagation();
            }
            else if (evt.commandName == EventCommandNames.SoftDelete)
            {
                DeleteSelection("Delete", DeleteElementsAction.AskUser.AskUser);
                evt.StopPropagation();
            }
            else if (evt.commandName == EventCommandNames.FrameSelected)
            {
                FrameSelection();
                evt.StopPropagation();
            }

            if (evt.isPropagationStopped && evt.imguiEvent != null)
            {
                evt.imguiEvent.Use();
            }
        }
コード例 #19
0
            protected override void ExecuteDefaultActionAtTarget(EventBase evt)
            {
                base.ExecuteDefaultActionAtTarget(evt);

                bool hasChanged = false;

                if (evt.eventTypeId == KeyDownEvent.TypeId())
                {
                    KeyDownEvent kde = evt as KeyDownEvent;

                    if ((kde?.character == 3) ||     // KeyCode.KeypadEnter
                        (kde?.character == '\n'))    // KeyCode.Return
                    {
                        // Here we should update the value, but it will be done when the blur event is handled...
                        parent.Focus();
                        evt.StopPropagation();
                        evt.PreventDefault();
                    }
                    else if (!isReadOnly)
                    {
                        hasChanged = true;
                    }
                }
                else if (!isReadOnly && evt.eventTypeId == ExecuteCommandEvent.TypeId())
                {
                    ExecuteCommandEvent commandEvt = evt as ExecuteCommandEvent;
                    string cmdName = commandEvt.commandName;
                    if (cmdName == EventCommandNames.Paste || cmdName == EventCommandNames.Cut)
                    {
                        hasChanged = true;
                    }
                }

                if (!hash128Field.isDelayed && hasChanged)
                {
                    // Prevent text from changing when the value change
                    // This allow expression (2+2) or string like 00123 to remain as typed in the TextField until enter is pressed
                    m_UpdateTextFromValue = false;
                    try
                    {
                        UpdateValueFromText();
                    }
                    finally
                    {
                        m_UpdateTextFromValue = true;
                    }
                }
            }
コード例 #20
0
 public static async Task SendCommand(IEndpointInstance endpointInstance, Plugin plugin, string pluginCommand, string argumentsJson)
 {
     var command = new ExecuteCommandEvent
     {
         CommandGuid       = Guid.NewGuid(),
         CommandSpreadType = CommandSpreadTypeEnum.All,
         CommandArgument   = new ArgumentWrapper
         {
             PluginGuid       = plugin.PluginGuid,
             PluginName       = plugin.PluginName,
             PluginCommand    = pluginCommand,
             ArgumentDataJson = argumentsJson
         }
     };
     await endpointInstance.Publish(command);
 }
コード例 #21
0
        public void OnCommandExecute(ExecuteCommandEvent evt)
        {
            switch (evt.commandName)
            {
            case EventCommandNames.Cut: PerformActionOnSelection(CutElement, ClearCopyBuffer, JustNotify); return;

            case EventCommandNames.Copy: PerformActionOnSelection(CopyElement, ClearCopyBuffer); return;

            case EventCommandNames.SoftDelete:
            case EventCommandNames.Delete: PerformActionOnSelection(DeleteElement, null, ClearSelectionNotify); return;

            case EventCommandNames.Duplicate: PerformActionOnSelection(DuplicateElement, ClearCopyBuffer, Paste); return;

            case EventCommandNames.Paste: Paste(); return;
            }
        }
コード例 #22
0
        public void OnCommandExecute(ExecuteCommandEvent evt)
        {
            switch (evt.commandName)
            {
            case EventCommandNames.Cut: CutSelection(); return;

            case EventCommandNames.Copy: CopySelection(); return;

            case EventCommandNames.SoftDelete:
            case EventCommandNames.Delete: DeleteSelection(); return;

            case EventCommandNames.Duplicate: DuplicateSelection(); return;

            case EventCommandNames.Paste: Paste(); return;

            case EventCommandNames.Rename: RenameSelection(); return;
            }
        }
コード例 #23
0
        protected internal override void ExecuteDefaultActionAtTarget(EventBase evt)
        {
            base.ExecuteDefaultActionAtTarget(evt);

            bool hasChanged = false;

            if (evt.GetEventTypeId() == KeyDownEvent.TypeId())
            {
                KeyDownEvent kde = evt as KeyDownEvent;
                if (kde.character == '\n')
                {
                    UpdateValueFromText();
                }
                else
                {
                    hasChanged = true;
                }
            }
            else if (evt.GetEventTypeId() == ExecuteCommandEvent.TypeId())
            {
                ExecuteCommandEvent commandEvt = evt as ExecuteCommandEvent;
                string cmdName = commandEvt.commandName;
                if (cmdName == EventCommandNames.Paste || cmdName == EventCommandNames.Cut)
                {
                    hasChanged = true;
                }
            }

            if (!isDelayed && hasChanged)
            {
                // Prevent text from changing when the value change
                // This allow expression (2+2) or string like 00123 to remain as typed in the TextField until enter is pressed
                m_UpdateTextFromValue = false;
                try
                {
                    UpdateValueFromText();
                }
                finally
                {
                    m_UpdateTextFromValue = true;
                }
            }
        }
コード例 #24
0
        public static void ExecuteCommand(BaseCommand command)
        {
            // Get all command registrations
            var registrations = Registrations.Where(q => q.Command.GetType().FullName.Equals(command.GetType().FullName))?.OrderBy(q => q.Order);

            foreach (var registration in Registrations.OrderBy(q => q.Order))
            {
                if (!registration.Command.FullName.Equals(registration.Command.FullName))
                {
                    continue;
                }

                ExecuteCommandEvent?.Invoke(registration, command);

                //registration.CommandReceiver.Execute(command);

                if (!command.Continue)
                {
                    break;
                }
            }
        }
コード例 #25
0
        protected internal override void ExecuteDefaultActionAtTarget(EventBase evt)
        {
            base.ExecuteDefaultActionAtTarget(evt);

            if (evt.GetEventTypeId() == KeyDownEvent.TypeId())
            {
                KeyDownEvent kde = evt as KeyDownEvent;
                if (!isDelayed || kde.character == '\n')
                {
                    value = text;
                }
            }
            else if (evt.GetEventTypeId() == ExecuteCommandEvent.TypeId())
            {
                ExecuteCommandEvent commandEvt = evt as ExecuteCommandEvent;
                string cmdName = commandEvt.commandName;
                if (!isDelayed && (cmdName == EventCommandNames.Paste || cmdName == EventCommandNames.Cut))
                {
                    value = text;
                }
            }
        }
コード例 #26
0
        void SelectAllTypes(bool state, EventTypeSelection eventTypeSelection = EventTypeSelection.All)
        {
            foreach (KeyValuePair <long, bool> v in m_State.ToList())
            {
                long eventTypeId = v.Key;

                if (eventTypeSelection == EventTypeSelection.All ||
                    (eventTypeSelection == EventTypeSelection.Mouse &&
                     (eventTypeId == MouseMoveEvent.TypeId() ||
                      eventTypeId == MouseOverEvent.TypeId() ||
                      eventTypeId == MouseDownEvent.TypeId() ||
                      eventTypeId == MouseUpEvent.TypeId() ||
                      eventTypeId == WheelEvent.TypeId() ||
                      eventTypeId == ContextClickEvent.TypeId())) ||
                    (eventTypeSelection == EventTypeSelection.Keyboard &&
                     (eventTypeId == KeyDownEvent.TypeId() ||
                      eventTypeId == KeyUpEvent.TypeId())) ||
                    (eventTypeSelection == EventTypeSelection.Drag &&
                     (eventTypeId == DragUpdatedEvent.TypeId() ||
                      eventTypeId == DragPerformEvent.TypeId() ||
                      eventTypeId == DragExitedEvent.TypeId())) ||
                    (eventTypeSelection == EventTypeSelection.Command &&
                     (eventTypeId == ValidateCommandEvent.TypeId() ||
                      eventTypeId == ExecuteCommandEvent.TypeId())))
                {
                    m_State[eventTypeId] = state;
                }
                else
                {
                    // Unaffected should be reset to false
                    m_State[eventTypeId] = false;
                }
            }

            UpdateValue();
        }
コード例 #27
0
ファイル: RecorderWindow.cs プロジェクト: jfox-ku/GJG-Staj
 void OnRecorderListExecuteCommand(ExecuteCommandEvent evt)
 {
     RecorderListExecuteCommand(evt, evt.commandName);
 }
コード例 #28
0
        void OnExecuteCommandEvent(ExecuteCommandEvent evt)
        {
            if (!textInputField.hasFocus)
            {
                return;
            }

            textInputField.SyncTextEngine();
            m_Changed = false;

            bool   mayHaveChanged = false;
            string oldText        = editorEngine.text;

            if (!textInputField.hasFocus)
            {
                return;
            }

            switch (evt.commandName)
            {
            case EventCommandNames.OnLostFocus:
                evt.StopPropagation();
                return;

            case EventCommandNames.Cut:
                editorEngine.Cut();
                mayHaveChanged = true;
                break;

            case EventCommandNames.Copy:
                editorEngine.Copy();
                evt.StopPropagation();
                return;

            case EventCommandNames.Paste:
                editorEngine.Paste();
                mayHaveChanged = true;
                break;

            case EventCommandNames.SelectAll:
                editorEngine.SelectAll();
                evt.StopPropagation();
                return;

            case EventCommandNames.Delete:
                // This "Delete" command stems from a Shift-Delete in the text
                // On Windows, Shift-Delete in text does a cut whereas on Mac, it does a delete.
                if (SystemInfo.operatingSystemFamily == OperatingSystemFamily.MacOSX)
                {
                    editorEngine.Delete();
                }
                else
                {
                    editorEngine.Cut();
                }
                mayHaveChanged = true;
                break;
            }

            if (mayHaveChanged)
            {
                if (oldText != editorEngine.text)
                {
                    m_Changed = true;
                }

                evt.StopPropagation();
            }

            if (m_Changed)
            {
                editorEngine.text = textInputField.CullString(editorEngine.text);
                textInputField.UpdateText(editorEngine.text);
                evt.StopPropagation();
            }

            // Scroll offset might need to be updated
            editorEngine.UpdateScrollOffset();
        }
コード例 #29
0
 /// <summary>
 /// ���û�����һ��ִ��ģ����������
 /// </summary>
 /// <param name="event">The @event.</param>
 public void OnExecuteCommand(ExecuteCommandEvent @event)
 {
     var target = @event.GetTargetInstance();
     if(target.CanExecute(@event.Param))
     {
         target.Execute(@event.Param);
     }
 }
コード例 #30
0
 private void OnExecuteCommand(ExecuteCommandEvent evt)
 {
     graphView?.OnExecuteCommand(evt);
 }
コード例 #31
0
        void UpdateEventbaseInfo(EventDebuggerEventRecord eventBase, IEventHandler focused, IEventHandler capture)
        {
            ClearEventbaseInfo();

            if (eventBase == null)
            {
                return;
            }

            m_EventbaseInfo.text += "Focused element: " + EventDebugger.GetObjectDisplayName(focused) + "\n";
            m_EventbaseInfo.text += "Capture element: " + EventDebugger.GetObjectDisplayName(capture) + "\n";

            if (eventBase.eventTypeId == MouseMoveEvent.TypeId() ||
                eventBase.eventTypeId == MouseOverEvent.TypeId() ||
                eventBase.eventTypeId == MouseOutEvent.TypeId() ||
                eventBase.eventTypeId == MouseDownEvent.TypeId() ||
                eventBase.eventTypeId == MouseUpEvent.TypeId() ||
                eventBase.eventTypeId == MouseEnterEvent.TypeId() ||
                eventBase.eventTypeId == MouseLeaveEvent.TypeId() ||
                eventBase.eventTypeId == DragEnterEvent.TypeId() ||
                eventBase.eventTypeId == DragLeaveEvent.TypeId() ||
                eventBase.eventTypeId == DragUpdatedEvent.TypeId() ||
                eventBase.eventTypeId == DragPerformEvent.TypeId() ||
                eventBase.eventTypeId == DragExitedEvent.TypeId() ||
                eventBase.eventTypeId == ContextClickEvent.TypeId() ||
                eventBase.eventTypeId == PointerMoveEvent.TypeId() ||
                eventBase.eventTypeId == PointerOverEvent.TypeId() ||
                eventBase.eventTypeId == PointerOutEvent.TypeId() ||
                eventBase.eventTypeId == PointerDownEvent.TypeId() ||
                eventBase.eventTypeId == PointerUpEvent.TypeId() ||
                eventBase.eventTypeId == PointerCancelEvent.TypeId() ||
                eventBase.eventTypeId == PointerStationaryEvent.TypeId() ||
                eventBase.eventTypeId == PointerEnterEvent.TypeId() ||
                eventBase.eventTypeId == PointerLeaveEvent.TypeId())
            {
                m_EventbaseInfo.text += "Mouse position: " + eventBase.mousePosition + "\n";
                m_EventbaseInfo.text += "Modifiers: " + eventBase.modifiers + "\n";
            }

            if (eventBase.eventTypeId == KeyDownEvent.TypeId() ||
                eventBase.eventTypeId == KeyUpEvent.TypeId())
            {
                m_EventbaseInfo.text += "Modifiers: " + eventBase.modifiers + "\n";
            }

            if (eventBase.eventTypeId == MouseDownEvent.TypeId() ||
                eventBase.eventTypeId == MouseUpEvent.TypeId() ||
                eventBase.eventTypeId == PointerDownEvent.TypeId() ||
                eventBase.eventTypeId == PointerUpEvent.TypeId() ||
                eventBase.eventTypeId == DragUpdatedEvent.TypeId() ||
                eventBase.eventTypeId == DragPerformEvent.TypeId() ||
                eventBase.eventTypeId == DragExitedEvent.TypeId())
            {
                m_EventbaseInfo.text += "Button: " + (eventBase.button == 0 ? "Left" : eventBase.button == 1 ? "Middle" : "Right") + "\n";
                m_EventbaseInfo.text += "Click count: " + eventBase.clickCount + "\n";
            }

            if (eventBase.eventTypeId == MouseMoveEvent.TypeId() ||
                eventBase.eventTypeId == MouseOverEvent.TypeId() ||
                eventBase.eventTypeId == MouseOutEvent.TypeId() ||
                eventBase.eventTypeId == MouseDownEvent.TypeId() ||
                eventBase.eventTypeId == MouseUpEvent.TypeId() ||
                eventBase.eventTypeId == MouseEnterEvent.TypeId() ||
                eventBase.eventTypeId == MouseLeaveEvent.TypeId() ||
                eventBase.eventTypeId == DragEnterEvent.TypeId() ||
                eventBase.eventTypeId == DragLeaveEvent.TypeId() ||
                eventBase.eventTypeId == DragUpdatedEvent.TypeId() ||
                eventBase.eventTypeId == DragPerformEvent.TypeId() ||
                eventBase.eventTypeId == DragExitedEvent.TypeId() ||
                eventBase.eventTypeId == ContextClickEvent.TypeId() ||
                eventBase.eventTypeId == WheelEvent.TypeId() ||
                eventBase.eventTypeId == PointerMoveEvent.TypeId() ||
                eventBase.eventTypeId == PointerOverEvent.TypeId() ||
                eventBase.eventTypeId == PointerOutEvent.TypeId() ||
                eventBase.eventTypeId == PointerDownEvent.TypeId() ||
                eventBase.eventTypeId == PointerUpEvent.TypeId() ||
                eventBase.eventTypeId == PointerCancelEvent.TypeId() ||
                eventBase.eventTypeId == PointerStationaryEvent.TypeId() ||
                eventBase.eventTypeId == PointerEnterEvent.TypeId() ||
                eventBase.eventTypeId == PointerLeaveEvent.TypeId())
            {
                m_EventbaseInfo.text += "Pressed buttons: " + eventBase.pressedButtons + "\n";
            }

            if (eventBase.eventTypeId == WheelEvent.TypeId())
            {
                m_EventbaseInfo.text += "Mouse delta: " + eventBase.delta + "\n";
            }

            if (eventBase.eventTypeId == KeyDownEvent.TypeId() ||
                eventBase.eventTypeId == KeyUpEvent.TypeId())
            {
                if (char.IsControl(eventBase.character))
                {
                    m_EventbaseInfo.text += "Character: \\" + (byte)(eventBase.character) + "\n";
                }
                else
                {
                    m_EventbaseInfo.text += "Character: " + eventBase.character + "\n";
                }

                m_EventbaseInfo.text += "Key code: " + eventBase.keyCode + "\n";
            }

            if (eventBase.eventTypeId == ValidateCommandEvent.TypeId() ||
                eventBase.eventTypeId == ExecuteCommandEvent.TypeId())
            {
                m_EventbaseInfo.text += "Command: " + eventBase.commandName + "\n";
            }
        }