Example #1
0
        public void CheckNextCmd()
        {
            if (ConCanvas.activeSelf)
            {
                if (InputList != null && InputList.Count > 0)
                {
                    int max = InputList.Count - 1;

                    if (InputIndex < max)
                    {
                        InputIndex++;

                        if (ConInput != null)
                        {
                            ConInput.text = InputList[InputIndex];
                        }

                        ConInput.MoveToEndOfLine(false, false);
                    }
                    else if (InputIndex == max)
                    {
                        if (ConInput != null)
                        {
                            ConInput.text = "";
                        }

                        ConInput.MoveToEndOfLine(false, false);
                    }
                }
            }
        }
Example #2
0
        public void CheckPrevCmd()
        {
            if (ConCanvas.activeSelf)
            {
                if (InputList != null && InputList.Count > 0)
                {
                    if (InputIndex > 0)
                    {
                        InputIndex--;

                        if (ConInput != null)
                        {
                            ConInput.text = InputList[InputIndex];
                        }

                        ConInput.MoveToEndOfLine(false, false);
                    }
                }
            }
        }