TextFieldComponent

open class TextFieldComponent(val text: GetSetter<String>, preferredWidth: Int, val editable: Supplier<Boolean> = GetSetter.constant(true), val suggestion: String = "", val font: IFontRenderer = IMinecraft.INSTANCE.defaultFontRenderer, val forbiddenChars: Set<Char> = setOf('§')) : GuiComponent(source)

Inheritors

Constructors

Link copied to clipboard
constructor(text: GetSetter<String>, preferredWidth: Int, editable: Supplier<Boolean> = GetSetter.constant(true), suggestion: String = "", font: IFontRenderer = IMinecraft.INSTANCE.defaultFontRenderer, forbiddenChars: Set<Char> = setOf('§'))

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val height: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val width: Int

Functions

Link copied to clipboard
open fun checkScrollOffset(width: Int)
Link copied to clipboard
open override fun getHeight(): Int

Get the requested y size for this element. This is opposed to the actual size given in the context. Giving this element less space than this may result in misaligned or overlapping rendering.

Link copied to clipboard
open override fun getWidth(): Int

Get the requested x size for this element. This is opposed to the actual size given in the context. Giving this element less space than this may result in misaligned or overlapping rendering.

Link copied to clipboard
open override fun keyboardEvent(event: KeyboardEvent, context: GuiImmediateContext): Boolean

Called by the parent renderer.

Link copied to clipboard
open override fun mouseEvent(mouseEvent: MouseEvent, context: GuiImmediateContext): Boolean

Called by the parent renderer.

Link copied to clipboard
Link copied to clipboard
open override fun render(context: GuiImmediateContext)

Called by the parent renderer. The GL matrix stack is pre-transformed, so rendering can begin at (0, 0) and should not render beyond what the context says is available.

Link copied to clipboard
open fun scrollCursorIntoView(width: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun validateCursor()
Link copied to clipboard
fun writeText(s: String, width: Int)