Class GuiElementTextBase
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
public class GuiElementTextBase : GuiElementControl, IDisposable
- Inheritance
-
GuiElementTextBase
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
GuiElementTextBase(ICoreClientAPI, string, CairoFont, ElementBounds)
The prober for the text size.
public GuiElementTextBase(ICoreClientAPI capi, string text, CairoFont font, ElementBounds bounds)
Parameters
capi
ICoreClientAPIThe Client API
text
stringThe text of this element.
font
CairoFontThe font of the text.
bounds
ElementBoundsThe bounds of the element.
Fields
Font
The font of the Text Element.
public CairoFont Font
Field Value
text
protected string text
Field Value
textPathMode
Whether or not the text path mode is active.
public bool textPathMode
Field Value
textUtil
public TextDrawUtil textUtil
Field Value
Properties
Text
public string Text { get; set; }
Property Value
Methods
ComposeElements(Context, ImageSurface)
Composes the elements.
public override void ComposeElements(Context ctx, ImageSurface surface)
Parameters
ctx
Contextsurface
ImageSurfaceThe surface of the GUI.
ComposeTextElements(Context, ImageSurface)
public virtual void ComposeTextElements(Context ctx, ImageSurface surface)
Parameters
ctx
Contextsurface
ImageSurface
DrawMultilineTextAt(Context, double, double, EnumTextOrientation)
public double DrawMultilineTextAt(Context ctx, double posX, double posY, EnumTextOrientation orientation = EnumTextOrientation.Left)
Parameters
ctx
ContextposX
doubleposY
doubleorientation
EnumTextOrientation
Returns
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
ContextThe context of the text
text
stringThe text of the text.
posX
doubleThe X Position of the text.
posY
doubleThe Y position of the text.
textPathMode
boolThe pathing mode.
GetMultilineTextHeight()
public double GetMultilineTextHeight()
Returns
GetText()
Gets the text on the element.
public virtual string GetText()
Returns
- string
The text of the element.