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
ICoreClientAPIThe Client API
bounds
ElementBoundsThe bounds of the text input.
onTextChanged
Action<string>The event fired when the text is changed.
font
CairoFontThe font of the text.
Fields
highlightBounds
protected ElementBounds highlightBounds
Field Value
highlightTexture
protected LoadedTexture highlightTexture
Field Value
refocusStage
protected int refocusStage
Field Value
Methods
ComposeTextElements(Context, ImageSurface)
public override void ComposeTextElements(Context ctx, ImageSurface surface)
Parameters
ctx
Contextsurface
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
ICoreClientAPIThe client API
args
KeyEventThe key event arguments.
RenderInteractiveElements(float)
Renders the element as an interactive element.
public override void RenderInteractiveElements(float deltaTime)
Parameters
deltaTime
floatThe change in time.
SetPlaceHolderText(string)
public void SetPlaceHolderText(string text)
Parameters
text
string