Class RichTextComponent
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
public class RichTextComponent : RichTextComponentBase
- Inheritance
-
RichTextComponent
- Derived
- Inherited Members
- Extension Methods
Constructors
RichTextComponent(ICoreClientAPI, string, CairoFont)
public RichTextComponent(ICoreClientAPI api, string displayText, CairoFont font)
Parameters
api
ICoreClientAPIdisplayText
stringfont
CairoFont
Fields
DisplayText
public string DisplayText
Field Value
Font
public CairoFont Font
Field Value
Lines
public TextLine[] Lines
Field Value
- TextLine[]
linebreak
protected EnumLinebreakBehavior linebreak
Field Value
textUtil
protected TextDrawUtil textUtil
Field Value
Methods
CalcBounds(TextFlowPath[], double, double, double, out double)
Initializes the size and stuff. Return true if you had to enter the next line
public override EnumCalcBoundsResult CalcBounds(TextFlowPath[] flowPath, double currentLineHeight, double offsetX, double lineY, out double nextOffsetX)
Parameters
flowPath
TextFlowPath[]currentLineHeight
doubleoffsetX
doublelineY
doublenextOffsetX
double
Returns
- EnumCalcBoundsResult
True when longer than 1 line
ComposeElements(Context, ImageSurface)
Composes the element.
public override void ComposeElements(Context ctx, ImageSurface surface)
Parameters
ctx
ContextContext of the text component.
surface
ImageSurfaceThe surface of the image.
GetFontOrientOffsetX()
protected double GetFontOrientOffsetX()
Returns
RenderInteractiveElements(float, double, double, double)
Renders the text component.
public override void RenderInteractiveElements(float deltaTime, double renderX, double renderY, double renderZ)
Parameters
init()
protected void init()