示例#1
0
        /// <summary>
        /// Shows a dual text at the bottom of the terminal.
        /// </summary>
        public static void ShowDualText(GUIReferences data, string leftText, string rightText)
        {
            var dualTextObject = NGUITools.AddChild(data.TextTable.gameObject, data.DualText.gameObject);
            var dualText       = dualTextObject.GetComponent <DualTextEntry>();

            dualText.LeftTextComponent.text  = leftText;
            dualText.RightTextComponent.text = rightText;
            dualText.transform.SetAsFirstSibling();

            var widget = dualText.ParentWidget;

            widget.leftAnchor.target  = data.ScrollView.transform;
            widget.rightAnchor.target = data.ScrollView.transform;

            dualTextObject.SetActive(true);

            var textEntry = new TerminalEntry();

            textEntry.EntryType   = TerminalEntryType.SingleText;
            textEntry.SceneObject = dualTextObject;

            SList.Push(DataHolder.TerminalData.AllEntries, textEntry);
        }
示例#2
0
 /// <summary>
 /// Updates the scroll view position and bounds.
 /// </summary>
 public static void UpdateScroll(GUIReferences data)
 {
     data.ScrollView.ResetPosition();
     data.ScrollView.UpdatePosition();
     data.ScrollView.UpdateScrollbars(true);
 }
示例#3
0
 /// <summary>
 /// Shows the given text on the input.
 /// </summary>
 public static void ShowTextOnInput(GUIReferences data, string text)
 {
     data.Input.value = text;
 }
示例#4
0
        /// <summary>
        /// Shows the command from the command buffer accordingly to the index on TerminalData.
        /// </summary>
        public static void ShowCommandFromBuffer(TerminalData data, GUIReferences references)
        {
            var command = data.CurrentCommandBuffer[data.CurrentCommandBufferIndex];

            ShowTextOnInput(references, command);
        }
示例#5
0
 /// <summary>
 /// Calls reposition on the table.
 /// </summary>
 public static void UpdateTable(GUIReferences data)
 {
     data.TextTable.Reposition();
 }