Table of Contents

Class GuiElementTextBase

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll
public class GuiElementTextBase : GuiElementControl, IDisposable
Inheritance
GuiElementTextBase
Implements
Derived
Inherited Members

Constructors

GuiElementTextBase(ICoreClientAPI, string, CairoFont, ElementBounds)

The prober for the text size.

public GuiElementTextBase(ICoreClientAPI capi, string text, CairoFont font, ElementBounds bounds)

Parameters

capi ICoreClientAPI

The Client API

text string

The text of this element.

font CairoFont

The font of the text.

bounds ElementBounds

The bounds of the element.

Fields

Font

The font of the Text Element.

public CairoFont Font

Field Value

CairoFont

text

protected string text

Field Value

string

textPathMode

Whether or not the text path mode is active.

public bool textPathMode

Field Value

bool

textUtil

public TextDrawUtil textUtil

Field Value

TextDrawUtil

Properties

Text

public string Text { get; set; }

Property Value

string

Methods

ComposeElements(Context, ImageSurface)

Composes the elements.

public override void ComposeElements(Context ctx, ImageSurface surface)

Parameters

ctx Context
surface ImageSurface

The surface of the GUI.

ComposeTextElements(Context, ImageSurface)

public virtual void ComposeTextElements(Context ctx, ImageSurface surface)

Parameters

ctx Context
surface ImageSurface

DrawMultilineTextAt(Context, double, double, EnumTextOrientation)

public double DrawMultilineTextAt(Context ctx, double posX, double posY, EnumTextOrientation orientation = EnumTextOrientation.Left)

Parameters

ctx Context
posX double
posY double
orientation EnumTextOrientation

Returns

double

DrawTextLineAt(Context, string, double, double, bool)

Draws the line of text on a component.

public void DrawTextLineAt(Context ctx, string text, double posX, double posY, bool textPathMode = false)

Parameters

ctx Context

The context of the text

text string

The text of the text.

posX double

The X Position of the text.

posY double

The Y position of the text.

textPathMode bool

The pathing mode.

GetMultilineTextHeight()

public double GetMultilineTextHeight()

Returns

double

GetText()

Gets the text on the element.

public virtual string GetText()

Returns

string

The text of the element.