Table of Contents

Class GuiElementStaticText

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

Constructors

GuiElementStaticText(ICoreClientAPI, string, EnumTextOrientation, ElementBounds, CairoFont)

Creates a new GUIElementStaticText.

public GuiElementStaticText(ICoreClientAPI capi, string text, EnumTextOrientation orientation, ElementBounds bounds, CairoFont font)

Parameters

capi ICoreClientAPI

The Client API

text string

The text of the Element

orientation EnumTextOrientation

The orientation of the text.

bounds ElementBounds

The bounds of the element.

font CairoFont

The font of the text.

Fields

offsetX

public double offsetX

Field Value

double

offsetY

public double offsetY

Field Value

double

Methods

AutoBoxSize(bool)

Resize element bounds so that the text fits in one line

public void AutoBoxSize(bool onlyGrow = false)

Parameters

onlyGrow bool

AutoFontSize(bool)

Resize the font so that the text fits in one line

public void AutoFontSize(bool onlyShrink = true)

Parameters

onlyShrink bool

ComposeTextElements(Context, ImageSurface)

public override void ComposeTextElements(Context ctx, ImageSurface surface)

Parameters

ctx Context
surface ImageSurface

GetTextHeight()

public double GetTextHeight()

Returns

double

SetValue(string)

public void SetValue(string text)

Parameters

text string