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
capi
ICoreClientAPIThe client API.
text
stringThe text of the text.
font
CairoFontThe font of the text.
maxWidth
intThe width of the text.
bounds
ElementBoundsthe bounds of the text.
background
TextBackground
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
ctx
Contextsurface
ImageSurfaceThe 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
api
ICoreClientAPIThe Client API
args
MouseEventThe 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
deltaTime
floatThe change in time.
SetAutoDisplay(bool)
Sets whether the text automatically displays or not.
public void SetAutoDisplay(bool on)
Parameters
on
boolWhether the text is displayed.
SetAutoWidth(bool)
Sets whether or not the width of the component should automatiocally adjust.
public void SetAutoWidth(bool on)
Parameters
on
bool
SetFollowMouse(bool)
public void SetFollowMouse(bool on)
Parameters
on
bool
SetNewText(string)
Sets the text of the component and changes it.
public void SetNewText(string text)
Parameters
text
stringThe text to change.
SetVisible(bool)
Sets the visibility to the
public void SetVisible(bool on)
Parameters
on
bool