Exemplo n.º 1
0
        private void SendClick(Vector2 position, int button)
        {
            m_GUIState.mousePosition = position;
            m_GUIState.eventType     = EventType.Layout;
            m_GUIState.BeginEventPass();
            m_GUISystem.OnGUI();

            m_GUIState.eventType   = EventType.MouseDown;
            m_GUIState.mouseButton = button;
            m_GUIState.clickCount  = 1;
            m_GUIState.BeginEventPass();
            m_GUISystem.OnGUI();

            m_GUIState.eventType = EventType.Layout;
            m_GUIState.BeginEventPass();
            m_GUISystem.OnGUI();

            m_GUIState.eventType = EventType.MouseUp;
            m_GUIState.BeginEventPass();
            m_GUISystem.OnGUI();
        }
Exemplo n.º 2
0
        private void SendEvent(EventType eventType)
        {
            m_GUIState.eventType = EventType.Layout;
            m_GUIState.BeginEventPass();
            m_GUISystem.OnGUI();

            m_GUIState.eventType = eventType;
            m_GUIState.BeginEventPass();
            m_GUISystem.OnGUI();
        }