Class GuiElementRichtext
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
public class GuiElementRichtext : GuiElement, IDisposable
- Inheritance
-
GuiElementRichtext
- Implements
- Inherited Members
- Extension Methods
Constructors
GuiElementRichtext(ICoreClientAPI, RichTextComponentBase[], ElementBounds)
public GuiElementRichtext(ICoreClientAPI capi, RichTextComponentBase[] components, ElementBounds bounds)
Parameters
capiICoreClientAPIcomponentsRichTextComponentBase[]boundsElementBounds
Fields
Components
public RichTextComponentBase[] Components
Field Value
Debug
public bool Debug
Field Value
DebugLogging
public static bool DebugLogging
Field Value
HalfComposed
public bool HalfComposed
Field Value
RenderColor
public Vec4f RenderColor
Field Value
flowPath
protected TextFlowPath[] flowPath
Field Value
richtTextTexture
public LoadedTexture richtTextTexture
Field Value
zPos
public float zPos
Field Value
Properties
MaxHeight
public int MaxHeight { get; set; }
Property Value
MaxLineWidth
public double MaxLineWidth { get; }
Property Value
TotalHeight
public double TotalHeight { get; }
Property Value
Methods
AppendText(RichTextComponentBase[])
public void AppendText(RichTextComponentBase[] comps)
Parameters
compsRichTextComponentBase[]
AppendText(RichTextComponent[])
[Obsolete("Use AppendText(RichTextComponentBase[] comps) instead")]
public void AppendText(RichTextComponent[] comps)
Parameters
compsRichTextComponent[]
BeforeCalcBounds()
public override void BeforeCalcBounds()
CalcHeightAndPositions()
public void CalcHeightAndPositions()
Compose(bool)
public void Compose(bool genTextureLater = false)
Parameters
genTextureLaterbool
ComposeElements(Context, ImageSurface)
Composes the elements.
public override void ComposeElements(Context ctxStatic, ImageSurface surfaceStatic)
Parameters
ctxStaticContextThe context of the components.
surfaceStaticImageSurface
ComposeFor(ElementBounds, Context, ImageSurface)
public virtual void ComposeFor(ElementBounds bounds, Context ctx, ImageSurface surface)
Parameters
boundsElementBoundsctxContextsurfaceImageSurface
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public override void Dispose()
OnMouseDownOnElement(ICoreClientAPI, MouseEvent)
The event fired when the mouse is pressed while on the element. Called after OnMouseDown and tells the engine that the event is handled.
public override void OnMouseDownOnElement(ICoreClientAPI api, MouseEvent args)
Parameters
apiICoreClientAPIThe Client API
argsMouseEventThe mouse event args.
OnMouseMove(ICoreClientAPI, MouseEvent)
The event fired when the mouse is moved.
public override void OnMouseMove(ICoreClientAPI api, MouseEvent args)
Parameters
apiICoreClientAPIThe Client API.
argsMouseEventThe mouse event arguments.
OnMouseUp(ICoreClientAPI, MouseEvent)
The event fired when the mouse is released.
public override void OnMouseUp(ICoreClientAPI api, MouseEvent args)
Parameters
apiICoreClientAPIThe Client API.
argsMouseEventThe arguments for the mouse event.
RecomposeInto(ImageSurface, Context)
public void RecomposeInto(ImageSurface surface, Context ctx)
Parameters
surfaceImageSurfacectxContext
RecomposeText()
Recomposes the element for lines.
public void RecomposeText()
RenderInteractiveElements(float)
Renders the element as an interactive element.
public override void RenderInteractiveElements(float deltaTime)
Parameters
deltaTimefloatThe change in time.
SetNewText(string, CairoFont, Action<LinkTextComponent>)
public void SetNewText(string vtmlCode, CairoFont baseFont, Action<LinkTextComponent> didClickLink = null)
Parameters
vtmlCodestringbaseFontCairoFontdidClickLinkAction<LinkTextComponent>
SetNewText(RichTextComponentBase[])
public void SetNewText(RichTextComponentBase[] comps)
Parameters
compsRichTextComponentBase[]
SetNewTextWithoutRecompose(string, CairoFont, Action<LinkTextComponent>, bool)
public void SetNewTextWithoutRecompose(string vtmlCode, CairoFont baseFont, Action<LinkTextComponent> didClickLink = null, bool recalcBounds = false)
Parameters
vtmlCodestringbaseFontCairoFontdidClickLinkAction<LinkTextComponent>recalcBoundsbool
genTexture()
public void genTexture()