示例#1
0
 internal void StartCompletionSession(CompletionSession session)
 {
     // To be able to calculate the screen pos for the popup we need to do it from an OnGUI code path so
     // we save the session and request a repaint to get an OnGUI event (see LineGUI for handling)
     m_Session = session;
     Repaint();
 }
		internal void StartCompletionSession(CompletionSession session)
		{
			// To be able to calculate the screen pos for the popup we need to do it from an OnGUI code path so
			// we save the session and request a repaint to get an OnGUI event (see LineGUI for handling)
			m_Session = session;
			Repaint();
		}
示例#3
0
        private void HandleCompletionSession()
        {
            if(m_Session == null)
                return;

            var state = new CodeViewPopUp.PopUpState();
            state.m_ListElements = m_Session.Completions.ToList();
            state.m_OnSelectCallback += CodeCompletionCallback;
            state.m_SelectedCompletion = -1; // Use -1 for invisible marker when showing
            state.m_CodeView = this;
            var spanRect = _textView.SpanForCurrentCharacter();
            var screenPos = new Vector2(spanRect.x, spanRect.y + _textView.LineHeight);
            m_Session = null;
            CodeViewPopUp.ShowAtPosition(screenPos, state);
        }