Class GuiElementHoverText
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
public class GuiElementHoverText : GuiElementTextBase, IDisposable
- Inheritance
-
GuiElementHoverText
- Implements
- Inherited Members
- Extension Methods
Constructors
GuiElementHoverText(ICoreClientAPI, string, CairoFont, int, ElementBounds, TextBackground)
Creates a new instance of hover text.
public GuiElementHoverText(ICoreClientAPI capi, string text, CairoFont font, int maxWidth, ElementBounds bounds, TextBackground background = null)
Parameters
capiICoreClientAPIThe client API.
textstringThe text of the text.
fontCairoFontThe font of the text.
maxWidthintThe width of the text.
boundsElementBoundsthe bounds of the text.
backgroundTextBackground
Remarks
For the text and the text.
Fields
Background
public TextBackground Background
Field Value
DefaultBackground
public static TextBackground DefaultBackground
Field Value
fillBounds
public bool fillBounds
Field Value
Properties
DrawOrder
0 = draw first, 1 = draw last. Only for interactive elements.
public override double DrawOrder { get; }
Property Value
IsNowShown
public bool IsNowShown { get; }
Property Value
IsVisible
public bool IsVisible { get; }
Property Value
RenderColor
public Vec4f RenderColor { get; set; }
Property Value
ZPosition
public float ZPosition { get; set; }
Property Value
Methods
BeforeCalcBounds()
public override void BeforeCalcBounds()
ComposeElements(Context, ImageSurface)
Composes the elements.
public override void ComposeElements(Context ctx, ImageSurface surface)
Parameters
ctxContextsurfaceImageSurfaceThe surface of the GUI.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public override void Dispose()
OnMouseDownOnElement(ICoreClientAPI, MouseEvent)
The event fired when the mouse is pressed while on the element. Called after OnMouseDown and tells the engine that the event is handled.
public override void OnMouseDownOnElement(ICoreClientAPI api, MouseEvent args)
Parameters
apiICoreClientAPIThe Client API
argsMouseEventThe mouse event args.
OutlineColor()
The compressed version of the debug outline color as a single int value.
public override int OutlineColor()
Returns
RenderBoundsDebug()
public override void RenderBoundsDebug()
RenderInteractiveElements(float)
Renders the element as an interactive element.
public override void RenderInteractiveElements(float deltaTime)
Parameters
deltaTimefloatThe change in time.
SetAutoDisplay(bool)
Sets whether the text automatically displays or not.
public void SetAutoDisplay(bool on)
Parameters
onboolWhether the text is displayed.
SetAutoWidth(bool)
Sets whether or not the width of the component should automatiocally adjust.
public void SetAutoWidth(bool on)
Parameters
onbool
SetFollowMouse(bool)
public void SetFollowMouse(bool on)
Parameters
onbool
SetNewText(string)
Sets the text of the component and changes it.
public void SetNewText(string text)
Parameters
textstringThe text to change.
SetVisible(bool)
Sets the visibility to the
public void SetVisible(bool on)
Parameters
onbool