.. default-domain:: cs .. highlight:: csharp .. namespace:: KRPC.Client.Services.UI Text ==== .. class:: Text A text label. Added to a :type:`Canvas` or a :type:`Panel`. | Base class: :type:`Object` .. container:: inherited-members .. rubric:: Inherited Members * From :type:`Object`: :prop:`RectTransform `, :prop:`LayoutElement `, :prop:`Visible `, :meth:`Remove ` .. property:: string Content { get; set; } The text string :Game Scenes: All .. property:: bool WordWrap { get; set; } Whether the text wraps onto further lines when it is wider than the space it has. Text that does not wrap carries on past the edge, and its preferred size is that of a single line, so a changing value leaves a layout in place. :Game Scenes: All .. property:: string Font { get; set; } Name of the font :Game Scenes: All .. note:: Empty if the game provided no font to draw the text with, in which case it is not drawn. See :prop:`Text.AvailableFonts` for the names that can be set. .. property:: System.Collections.Generic.IList AvailableFonts { get; } A list of all available fonts. :Game Scenes: All .. property:: int Size { get; set; } Font size. :Game Scenes: All .. property:: FontStyle Style { get; set; } Font style. :Game Scenes: All .. property:: StdLib.ColorRGBA Color { get; set; } The color the text is drawn in. :Game Scenes: All .. property:: TextAnchor Alignment { get; set; } Alignment. :Game Scenes: All .. property:: float LineSpacing { get; set; } Line spacing. :Game Scenes: All .. enum:: FontStyle Font style. .. enumerator:: Normal Normal. .. enumerator:: Bold Bold. .. enumerator:: Italic Italic. .. enumerator:: BoldAndItalic Bold and italic. .. enum:: TextAlignment Text alignment. .. enumerator:: Left Left aligned. .. enumerator:: Right Right aligned. .. enumerator:: Center Center aligned. .. enum:: TextAnchor Text alignment. .. enumerator:: LowerCenter Lower center. .. enumerator:: LowerLeft Lower left. .. enumerator:: LowerRight Lower right. .. enumerator:: MiddleCenter Middle center. .. enumerator:: MiddleLeft Middle left. .. enumerator:: MiddleRight Middle right. .. enumerator:: UpperCenter Upper center. .. enumerator:: UpperLeft Upper left. .. enumerator:: UpperRight Upper right.