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
capiICoreClientAPIThe Client API
textstringThe text of the Element
orientationEnumTextOrientationThe orientation of the text.
boundsElementBoundsThe bounds of the element.
fontCairoFontThe 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
onlyGrowbool
AutoFontSize(bool)
Resize the font so that the text fits in one line
public void AutoFontSize(bool onlyShrink = true)
Parameters
onlyShrinkbool
ComposeTextElements(Context, ImageSurface)
public override void ComposeTextElements(Context ctx, ImageSurface surface)
Parameters
ctxContextsurfaceImageSurface
GetTextHeight()
public double GetTextHeight()
Returns
SetValue(string)
public void SetValue(string text)
Parameters
textstring