public void SetAsTextPane(String Text, int NewlineIndent)
 {
     pAssociatedPane.Clear();
     if (DefaultTextPaneText == null)
     {
         DefaultTextPaneText                        = new TextEntity(Name + "_SCROLL_TEXT_ENTITY", "", new Vector2(20, 0), 1f);
         DefaultTextPaneText.TypeWrite              = false;
         DefaultTextPaneText.BufferLength           = pPaneDimensions.X - 40;
         DefaultTextPaneText.ForceSplitUnchunkables = true;
         DefaultTextPaneText.Text                   = Text;
         DefaultTextPaneText.NewlineIndent          = NewlineIndent;
         DefaultTextPaneText.DrawAsStatic           = true;
     }
     else
     {
         DefaultTextPaneText.BufferLength  = pPaneDimensions.X - 40;
         DefaultTextPaneText.Text          = Text;
         DefaultTextPaneText.NewlineIndent = NewlineIndent;
     }
     float[] YBorder = new float[] { DefaultTextPaneText.ChunkFontHeight[0] / 4, DefaultTextPaneText.ChunkFontHeight[DefaultTextPaneText.ChunkCount - 1] / 4 };
     DefaultTextPaneText.QuickMoveTo(new Vector2(20, YBorder[0]));
     TotalScrollHeight = DefaultTextPaneText.VerticalLength() + YBorder[0] + YBorder[1];
     pAssociatedPane.AddUpdate(DefaultTextPaneText);
     pAssociatedPane.AddRender(DefaultTextPaneText);
     UpdatePaneCameraPos();
 }
Exemplo n.º 2
0
 public void Clear()
 {
     Pane.Clear();
     Pane.Activate();
 }