Skip to content

API reference Obsidian.API.Client.Screens

TextField class

Vanilla's edit box: a line of text the player types, with a caret, selection and the clipboard. 200 by 20 pixels unless sized otherwise.

public sealed class TextField : Widget

In Obsidian.API.Client.

Constructors

public TextField();

Properties

Bordered

public bool Bordered { get; set; }

Whether the field's box is drawn; without it, the text is drawn on the screen's background, like the creative inventory's search.

Hint

public string Hint { get; set; }

Grey text shown while the field is empty and not focused, like vanilla's search hint; null for none.

MaxLength

public int MaxLength { get; set; }

How many characters the player can type.

Text

public string Text { get; set; }

The text. Setting it doesn't raise TextField.Changed.

Events

Changed

public event Action<string> Changed;

Raised with the new text when the player changes it.

On this page