Element

abstract class Element<S : Setting<*>>(val parent: ModuleButton, val setting: S, val type: ElementType)

Parent class to the settings elements in the click gui.

Author

Aton

Constructors

Link copied to clipboard
fun <S : Setting<*>> Element(parent: ModuleButton, setting: S, type: ElementType)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun drawScreen(mouseX: Int, mouseY: Int, partialTicks: Float): Int

Sets up the rendering of the element and dispatches rendering of the individual implementations.

Link copied to clipboard
open fun keyTyped(typedChar: Char, keyCode: Int): Boolean

Overridden in the elements to enable key detection.

Link copied to clipboard
open fun mouseClicked(mouseX: Int, mouseY: Int, mouseButton: Int): Boolean

Handles mouse clicks on the Element. To be overridden in the implementations.

Link copied to clipboard
open fun mouseReleased(mouseX: Int, mouseY: Int, state: Int)
Link copied to clipboard
fun update()

Updates the height of the Element based on extended.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var extended: Boolean = false
Link copied to clipboard
var height: Int

Height of the complete element included optional dropdown.

Link copied to clipboard
var listening: Boolean = false
Link copied to clipboard
Link copied to clipboard
val setting: S
Link copied to clipboard
Link copied to clipboard
val width: Int
Link copied to clipboard
var x: Int = 2

Relative position of this element in respect to parent.

Link copied to clipboard

Absolute position of the panel on the screen.

Link copied to clipboard
var y: Int = 0

Relative position of this element in respect to parent.

Link copied to clipboard

Absolute position of the panel on the screen.

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard