Component

class Component(parent: Component?, widget: IWidget?, index: Int) : Interactive, Identifiable, Validatable, Iterable<Component?> , Actionable, Nillable<Component?> , Textable

Types

Companion
Link copied to clipboard
object Companion

Functions

actions
Link copied to clipboard
open override fun actions(): List<String>

The current actions for the entity.

borderThickness
Link copied to clipboard
fun borderThickness(): Int
boundingModel
Link copied to clipboard
fun boundingModel(): BoundingModel?

Gets the current bounding model

fun boundingModel(boundingModel: BoundingModel?)

Sets the bounding model

fun boundingModel(expectedModel: BoundingModel?, boundingModel: BoundingModel?)

Compares and sets the bounding model

boundingRect
Link copied to clipboard
fun boundingRect(): Rectangle
bounds
Link copied to clipboard
open override fun bounds(arr: IntArray?)

Sets the boundaries of this entity utilizing an array.

open override fun bounds(x1: Int, x2: Int, y1: Int, y2: Int, z1: Int, z2: Int)

Sets the boundaries of this entity.

boundsIndex
Link copied to clipboard
fun boundsIndex(): Int
calculateScreenPosition
Link copied to clipboard
open override fun calculateScreenPosition(): Callable<Point>
centerPoint
Link copied to clipboard
open override fun centerPoint(): Point
click
Link copied to clipboard
open override fun click(): Boolean
open override fun click(action: String?): Boolean
open override fun click(action: String?, option: String?): Boolean
open override fun click(f: Filter<MenuCommand>, useMenu: Boolean): Boolean

{@inheritDoc}

open override fun click(f: (MenuCommand) -> Boolean): Boolean
component
Link copied to clipboard
fun component(index: Int): Component

Returns the component under this one at a certain index

componentCount
Link copied to clipboard
fun componentCount(): Int
components
Link copied to clipboard
fun components(): Array<Component>

Lazily creates all the sub components under this component.

contains
Link copied to clipboard
open operator override fun contains(point: Point?): Boolean

Whether or not the entity contains the point.

contentType
Link copied to clipboard
fun contentType(): Int
doSetBounds
Link copied to clipboard
fun doSetBounds(arr: IntArray?): Filter<Interactable?>
draw
Link copied to clipboard
open override fun draw(g: Graphics)

Renders the entity within the viewport at alpha = 255

fun draw(graphics: Graphics, color: Int = Color.CYAN)

Draws the component on the screen

equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
forEach
Link copied to clipboard
open fun forEach(p0: Consumer<in Component?>)
hashCode
Link copied to clipboard
open override fun hashCode(): Int
height
Link copied to clipboard
fun height(): Int
hidden
Link copied to clipboard
fun hidden(): Boolean
index
Link copied to clipboard
fun index(): Int
interact
Link copied to clipboard
open override fun interact(f: (MenuCommand) -> Boolean): Boolean
open override fun interact(action: String?): Boolean
open override fun interact(f: Filter<MenuCommand>): Boolean
open override fun interact(f: (MenuCommand) -> Boolean, useMenu: Boolean): Boolean
open override fun interact(action: String?, useMenu: Boolean): Boolean
open override fun interact(action: String?, option: String?): Boolean
open override fun interact(f: Filter<MenuCommand>, useMenu: Boolean): Boolean
open override fun interact(action: String?, option: String?, useMenu: Boolean): Boolean

{@inheritDoc}

inViewport
Link copied to clipboard
open override fun inViewport(): Boolean

{@inheritDoc}

open override fun inViewport(checkIfObstructed: Boolean): Boolean

Returns true if the object is currently rendered in the viewport.

itemId
Link copied to clipboard
fun itemId(): Int
itemIds
Link copied to clipboard
fun itemIds(): IntArray
itemStackSize
Link copied to clipboard
fun itemStackSize(): Int
itemStackSizes
Link copied to clipboard
fun itemStackSizes(): IntArray
iterator
Link copied to clipboard
open operator override fun iterator(): Iterator<Component>
modelId
Link copied to clipboard
fun modelId(): Int
modelType
Link copied to clipboard
fun modelType(): Int
modelZoom
Link copied to clipboard
fun modelZoom(): Int
nextPoint
Link copied to clipboard
open override fun nextPoint(): Point

The next game screen point of the entity.

nil
Link copied to clipboard
open override fun nil(): Component

A "null" instance. An object with no function. All methods will not evaluate to anything.

parent
Link copied to clipboard
fun parent(): Component?

Retrieves the parent component for this view.

parentId
Link copied to clipboard
fun parentId(): Int
screenPoint
Link copied to clipboard
fun screenPoint(): Point

Traverses the hierachy tree for this view and calculates the screen position of this view.

scrollHeight
Link copied to clipboard
fun scrollHeight(): Int
scrollWidth
Link copied to clipboard
fun scrollWidth(): Int
scrollX
Link copied to clipboard
fun scrollX(): Int
scrollY
Link copied to clipboard
fun scrollY(): Int
setParent
Link copied to clipboard
fun setParent(component: Component?)

Sets the IWidget for this parents view. Do not use unless you know what you are doing, can use .parent to retrieve it.

spliterator
Link copied to clipboard
open fun spliterator(): Spliterator<Component?>
text
Link copied to clipboard
open override fun text(): String

The text description of the entity.

textColor
Link copied to clipboard
fun textColor(): Int
textureId
Link copied to clipboard
fun textureId(): Int
tooltip
Link copied to clipboard
fun tooltip(): String
toString
Link copied to clipboard
open override fun toString(): String
triangles
Link copied to clipboard
open override fun triangles(): Array<Polygon>

The translated model triangles.

type
Link copied to clipboard
fun type(): Int
uid
Link copied to clipboard
fun uid(): Int
valid
Link copied to clipboard
open override fun valid(): Boolean

Checks if this component is valid

visible
Link copied to clipboard
fun visible(): Boolean
widgetId
Link copied to clipboard
fun widgetId(): Int
width
Link copied to clipboard
fun width(): Int
x
Link copied to clipboard
fun x(): Int
y
Link copied to clipboard
fun y(): Int

Properties

boundingModel
Link copied to clipboard
var boundingModel: AtomicReference<BoundingModel?>
parentSet
Link copied to clipboard
var parentSet: Boolean = false
widget
Link copied to clipboard
val widget: IWidget?