Entry

abstract class Entry<P : ParentElement>(val parentElement: P) : Element

A list entry. This is responsible for managing its own position, rendering of the list row, management of any children widgets, providing correct navigation, narration, and so on.

In particular, the CustomListWidget does not provide any mechanism to manage individual entry positions itself. Positions of entries must either be managed by list implementations, or in the entry itself. See DynamicListWidget for a (very in-depth) implementation example.

Author

fzzyhmstrs

Since

0.6.0

Parameters

parentElement

P a parent to attach to this entry. This is an indirect way of making this entry "inner", without actually doing that.

Inheritors

Constructors

Link copied to clipboard
constructor(parentElement: P)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open fun appendNarrations(builder: NarrationMessageBuilder)

Append narration messages to current NarrationMessageBuilder. The list will handle list position and navigation, the entry should focus on providing title and description information, and internal navigation information as applicable (if there are multiple children in one entry for example)

Link copied to clipboard
open fun charTyped(chr: Char, modifiers: Int): Boolean
Link copied to clipboard
@Nullable
open fun getFocusedPath(): GuiNavigationPath?
Link copied to clipboard
open fun getNavigationFocus(): ScreenRect
Link copied to clipboard
Link copied to clipboard
@Nullable
open fun getNavigationPath(navigation: GuiNavigation): GuiNavigationPath?
Link copied to clipboard
open override fun isFocused(): Boolean
Link copied to clipboard
open fun isMouseOver(mouseX: Double, mouseY: Double): Boolean
Link copied to clipboard
open fun keyPressed(keyCode: Int, scanCode: Int, modifiers: Int): Boolean
Link copied to clipboard
open fun keyReleased(keyCode: Int, scanCode: Int, modifiers: Int): Boolean
Link copied to clipboard
open fun mouseClicked(mouseX: Double, mouseY: Double, button: Int): Boolean
Link copied to clipboard
open fun mouseDragged(mouseX: Double, mouseY: Double, button: Int, deltaX: Double, deltaY: Double): Boolean
Link copied to clipboard
open fun mouseMoved(mouseX: Double, mouseY: Double)
Link copied to clipboard
open fun mouseReleased(mouseX: Double, mouseY: Double, button: Int): Boolean
Link copied to clipboard
open fun mouseScrolled(mouseX: Double, mouseY: Double, amount: Double): Boolean
Link copied to clipboard
abstract fun render(context: DrawContext, mouseX: Int, mouseY: Int, delta: Float)

Renders this entry. Works exactly as one would expect for any other render call.

Link copied to clipboard
open override fun setFocused(focused: Boolean)