Class GuiElementStaticText
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
public class GuiElementStaticText : GuiElementTextBase, IDisposable
- Inheritance
-
GuiElementStaticText
- Implements
- Inherited Members
- Extension Methods
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
ICoreClientAPIThe Client API
text
stringThe text of the Element
orientation
EnumTextOrientationThe orientation of the text.
bounds
ElementBoundsThe bounds of the element.
font
CairoFontThe font of the text.
Fields
offsetX
public double offsetX
Field Value
offsetY
public double offsetY
Field Value
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
Contextsurface
ImageSurface
GetTextHeight()
public double GetTextHeight()
Returns
SetValue(string)
public void SetValue(string text)
Parameters
text
string