Class RichTextComponentBase
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
public abstract class RichTextComponentBase
- Inheritance
-
RichTextComponentBase
- Derived
- Inherited Members
- Extension Methods
Constructors
RichTextComponentBase(ICoreClientAPI)
public RichTextComponentBase(ICoreClientAPI api)
Parameters
api
ICoreClientAPI
Fields
api
protected ICoreClientAPI api
Field Value
Properties
BoundsPerLine
The width/height boundaries of this text component per line
public virtual LineRectangled[] BoundsPerLine { get; protected set; }
Property Value
Float
When left or right, then this element can span over multiple text lines
public virtual EnumFloat Float { get; set; }
Property Value
MouseOverCursor
public string MouseOverCursor { get; protected set; }
Property Value
PaddingLeft
Unscaled value
public virtual double PaddingLeft { get; set; }
Property Value
PaddingRight
Padding that is used when a richtextcomponent came before and needs some left spacing to it. Unscaled value
public virtual double PaddingRight { get; set; }
Property Value
RenderColor
public virtual Vec4f RenderColor { get; set; }
Property Value
UnscaledMarginTop
This will be the Y-Advance into the next line. Unscaled value. Also used as the offset with EnumVerticalAlign.FixedOffset
public virtual double UnscaledMarginTop { get; set; }
Property Value
VerticalAlign
public virtual EnumVerticalAlign VerticalAlign { get; set; }
Property 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 virtual EnumCalcBoundsResult CalcBounds(TextFlowPath[] flowPath, double currentLineHeight, double offsetX, double lineY, out double nextOffsetX)
Parameters
flowPath
TextFlowPath[]currentLineHeight
doubleoffsetX
doublelineY
doublenextOffsetX
double
Returns
ComposeElements(Context, ImageSurface)
Composes the element.
public virtual void ComposeElements(Context ctx, ImageSurface surface)
Parameters
ctx
Contextsurface
ImageSurface
Dispose()
public virtual void Dispose()
GetCurrentFlowPathSection(TextFlowPath[], double)
protected virtual TextFlowPath GetCurrentFlowPathSection(TextFlowPath[] flowPath, double posY)
Parameters
flowPath
TextFlowPath[]posY
double
Returns
OnMouseDown(MouseEvent)
public virtual void OnMouseDown(MouseEvent args)
Parameters
args
MouseEvent
OnMouseMove(MouseEvent)
public virtual void OnMouseMove(MouseEvent args)
Parameters
args
MouseEvent
OnMouseUp(MouseEvent)
public virtual void OnMouseUp(MouseEvent args)
Parameters
args
MouseEvent
RenderInteractiveElements(float, double, double, double)
Renders the text component.
public virtual void RenderInteractiveElements(float deltaTime, double renderX, double renderY, double renderZ)
Parameters
UseMouseOverCursor(ElementBounds)
public virtual bool UseMouseOverCursor(ElementBounds richtextBounds)
Parameters
richtextBounds
ElementBounds