Table of Contents

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 ICoreClientAPI

The client API.

text string

The text of the text.

font CairoFont

The font of the text.

maxWidth int

The width of the text.

bounds ElementBounds

the bounds of the text.

background TextBackground

Remarks

For the text and the text.

Fields

Background

public TextBackground Background

Field Value

TextBackground

DefaultBackground

public static TextBackground DefaultBackground

Field Value

TextBackground

fillBounds

public bool fillBounds

Field Value

bool

Properties

DrawOrder

0 = draw first, 1 = draw last. Only for interactive elements.

public override double DrawOrder { get; }

Property Value

double

IsNowShown

public bool IsNowShown { get; }

Property Value

bool

IsVisible

public bool IsVisible { get; }

Property Value

bool

RenderColor

public Vec4f RenderColor { get; set; }

Property Value

Vec4f

ZPosition

public float ZPosition { get; set; }

Property Value

float

Methods

BeforeCalcBounds()

public override void BeforeCalcBounds()

ComposeElements(Context, ImageSurface)

Composes the elements.

public override void ComposeElements(Context ctx, ImageSurface surface)

Parameters

ctx Context
surface ImageSurface

The 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 ICoreClientAPI

The Client API

args MouseEvent

The mouse event args.

OutlineColor()

The compressed version of the debug outline color as a single int value.

public override int OutlineColor()

Returns

int

RenderBoundsDebug()

public override void RenderBoundsDebug()

RenderInteractiveElements(float)

Renders the element as an interactive element.

public override void RenderInteractiveElements(float deltaTime)

Parameters

deltaTime float

The change in time.

SetAutoDisplay(bool)

Sets whether the text automatically displays or not.

public void SetAutoDisplay(bool on)

Parameters

on bool

Whether 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 string

The text to change.

SetVisible(bool)

Sets the visibility to the

public void SetVisible(bool on)

Parameters

on bool