Table of Contents

Class GuiElementTextInput

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll
public class GuiElementTextInput : GuiElementEditableTextBase, IDisposable
Inheritance
GuiElementTextInput
Implements
Derived
Inherited Members
Extension Methods

Constructors

GuiElementTextInput(ICoreClientAPI, ElementBounds, Action<string>, CairoFont)

Adds a text input to the GUI

public GuiElementTextInput(ICoreClientAPI capi, ElementBounds bounds, Action<string> onTextChanged, CairoFont font)

Parameters

capi ICoreClientAPI

The Client API

bounds ElementBounds

The bounds of the text input.

onTextChanged Action<string>

The event fired when the text is changed.

font CairoFont

The font of the text.

Fields

highlightBounds

protected ElementBounds highlightBounds

Field Value

ElementBounds

highlightTexture

protected LoadedTexture highlightTexture

Field Value

LoadedTexture

refocusStage

protected int refocusStage

Field Value

int

Methods

ComposeTextElements(Context, ImageSurface)

public override void ComposeTextElements(Context ctx, ImageSurface surface)

Parameters

ctx Context
surface ImageSurface

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public override void Dispose()

HideCharacters()

Tells the text component to hide the characters in the text.

public void HideCharacters()

OnFocusGained()

The event fired when the element gains focus.

public override void OnFocusGained()

OnFocusLost()

The event fired when the element looses focus.

public override void OnFocusLost()

OnKeyDown(ICoreClientAPI, KeyEvent)

The event fired when a key is held down.

public override void OnKeyDown(ICoreClientAPI api, KeyEvent args)

Parameters

api ICoreClientAPI

The client API

args KeyEvent

The key event arguments.

RenderInteractiveElements(float)

Renders the element as an interactive element.

public override void RenderInteractiveElements(float deltaTime)

Parameters

deltaTime float

The change in time.

SetPlaceHolderText(string)

public void SetPlaceHolderText(string text)

Parameters

text string