Class SimpleText
- Namespace
- Lime
- Assembly
- Lime.dll
[TangerineVisualHintGroup("/All/Nodes/Text", null)]
public class SimpleText : Widget, IDisposable, IAnimatorHost, IRenderChainBuilder, IAnimable, ICloneable, IText
- Inheritance
-
SimpleText
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
SimpleText()
public SimpleText()
Properties
Caret
public ICaretPosition Caret { get; set; }
Property Value
DisplayText
public string DisplayText { get; }
Property Value
EffectiveMaxSize
public override Vector2 EffectiveMaxSize { get; }
Property Value
EffectiveMinSize
public override Vector2 EffectiveMinSize { get; }
Property Value
Font
[YuzuMember]
[TangerineKeyframeColor(29)]
public SerializableFont Font { get; set; }
Property Value
FontHeight
[YuzuMember]
[TangerineKeyframeColor(31)]
[Validation.Range(0, 3.4028235E+38)]
public float FontHeight { get; set; }
Property Value
ForceUncutText
[YuzuMember]
public bool ForceUncutText { get; set; }
Property Value
GradientMapIndex
[YuzuMember]
public int GradientMapIndex { get; set; }
Property Value
HAlignment
[YuzuMember]
[TangerineKeyframeColor(2)]
public HAlignment HAlignment { get; set; }
Property Value
LetterSpacing
[YuzuMember]
[TangerineKeyframeColor(7)]
public float LetterSpacing { get; set; }
Property Value
Localizable
public bool Localizable { get; set; }
Property Value
OverflowMode
[YuzuMember]
[TangerineKeyframeColor(4)]
public TextOverflowMode OverflowMode { get; set; }
Property Value
RenderMode
public TextRenderingMode RenderMode { get; set; }
Property Value
Spacing
[YuzuMember]
[TangerineKeyframeColor(1)]
public float Spacing { get; set; }
Property Value
Text
Get or sets a label upon the widget. For widgets which can not have a label returns null.
[YuzuMember]
[TangerineKeyframeColor(30)]
public override string Text { get; set; }
Property Value
TextColor
[YuzuMember]
[TangerineKeyframeColor(6)]
public Color4 TextColor { get; set; }
Property Value
TrimWhitespaces
public bool TrimWhitespaces { get; set; }
Property Value
VAlignment
[YuzuMember]
[TangerineKeyframeColor(3)]
public VAlignment VAlignment { get; set; }
Property Value
WordSplitAllowed
[YuzuMember]
[TangerineKeyframeColor(5)]
public bool WordSplitAllowed { get; set; }
Property Value
Methods
AddToRenderChain(RenderChain)
Adds widget and all its descendants to render chain.
public override void AddToRenderChain(RenderChain chain)
Parameters
chain
RenderChain
CanDisplay(char)
public bool CanDisplay(char ch)
Parameters
ch
char
Returns
FitTextInsideWidgetArea(float)
Changes FontHeight and Spacing to make the text inside widget's area.
public void FitTextInsideWidgetArea(float minFontHeight = 10)
Parameters
minFontHeight
float
GetCharPair(Vector2, out (CharPosition, CharPosition))
public bool GetCharPair(Vector2 point, out (CharPosition, CharPosition) pair)
Parameters
point
Vector2pair
(CharPosition, CharPosition)
Returns
GetRenderObject()
TODO: Add summary.
protected override RenderObject GetRenderObject()
Returns
Invalidate()
public void Invalidate()
MeasureText()
Gets the text's bounding box.
public Rectangle MeasureText()
Returns
MeasureUncutText()
public Vector2 MeasureUncutText()
Returns
OnSizeChanged(Vector2)
protected override void OnSizeChanged(Vector2 sizeDelta)
Parameters
sizeDelta
Vector2
SetLocalizeArguments(params string[])
Arguments that will be passed into Text.Localize(...)
public void SetLocalizeArguments(params string[] args)
Parameters
args
string[]
StaticScale(float, bool)
TODO: Add summary
public override void StaticScale(float ratio, bool roundCoordinates)
Parameters
Events
GlobalTextProcessor
Processes a text assigned to any SimpleText instance.
public static event TextProcessorDelegate GlobalTextProcessor
Event Type
Submitted
public event Action<string> Submitted
Event Type
TextProcessor
Processes a text assigned to this SimpleText instance.
public event TextProcessorDelegate TextProcessor