public void MoveLineMarker()
        {
            int preRows  = (string.IsNullOrEmpty(preCode) ? 0 : preCode.Split('\n').Length) + 1;
            int selected = preRows + IDEPARSER.calcCurrentSelectedLine(theInputField.caretPosition, theInputField.text);

            IDELineMarker.SetIDEPosition(selected);
        }
示例#2
0
        public void InitLineMarker(IDETextField textField, IDEFocusLord focusLord)
        {
            instance = this;

            theTextField  = textField;
            theFocusLord  = focusLord;
            theMarkerRect = transform as RectTransform;
            enabled       = false;
            theErrorBubble.Init(this);
        }
示例#3
0
        public void initLineMarker(IDETextField theTextField, IDEFocusLord theFocusLord)
        {
            instance = this;

            this.theTextField = theTextField;
            this.theFocusLord = theFocusLord;
            theMarkerRect     = transform as RectTransform;
            this.enabled      = false;
            theImage          = GetComponentInChildren <Image>();
            theErrorBubble.init(this);
        }
 public void MoveLineMarker()
 {
     if (PMWrapper.IsDemoingLevel)
     {
         IDELineMarker.instance.SetState(IDELineMarker.State.Hidden);
     }
     else
     {
         int preRows  = (string.IsNullOrEmpty(preCode) ? 0 : preCode.Split('\n').Length) + 1;
         int selected = preRows + IDEPARSER.calcCurrentSelectedLine(theInputField.caretPosition, theInputField.text);
         IDELineMarker.SetIDEPosition(selected);
     }
 }
示例#5
0
        void WalkLine()
        {
            try
            {
                IDELineMarker.SetWalkerPosition(currentLineNumber);

                compiledCode.WalkLine();

                if (compiledCode == null)
                {
                    return;
                }

                if (!compiledCode.CurrentSource.IsFromClr)
                {
                    lastLineNumber = compiledCode.CurrentSource.FromRow;
                }

                theVarWindow.UpdateList(compiledCode);

                if (compiledCode.State == ProcessState.Yielded)
                {
                    sleepTimeLeft = sleepTime * hideLineWhenTimeLeftFactor;
                }
                else
                {
                    sleepTimeLeft = Mathf.Clamp(sleepTime * (1 - PMWrapper.speedMultiplier), 0.01f, 1000);
                }
            }
            catch (Exception e)
            {
                Debug.LogException(e);

                if (compiledCode != null && !compiledCode.CurrentSource.IsFromClr)
                {
                    lastLineNumber = compiledCode.CurrentSource.FromRow;
                    IDELineMarker.SetWalkerPosition(currentLineNumber);
                }

                StopCompiler(StopStatus.RuntimeError);
                PMWrapper.RaiseError(e.Message);
                throw;
            }
        }
示例#6
0
 public void Init(IDELineMarker marker)
 {
     theMarker = marker;
 }
 public void init(IDELineMarker theMarker)
 {
     this.theMarker = theMarker;
 }