UIObject

abstract class UIObject(val x: Int, val y: Int) : Object

The basic class of all the UI elements like Menu, Sidebar.

Author

KKoishi_

Parameters

x

the X coordinate of the UIObject.

y

the Y coordinate of the UIObject.

Inheritors

Constructors

Link copied to clipboard
constructor(x: Int, y: Int)

Properties

Link copied to clipboard
open override val uuid: UUID

The universally unique identifier(UUID) of this object

Link copied to clipboard
val x: Int
Link copied to clipboard
val y: Int

Functions

Link copied to clipboard
override fun collide(o: Object): Boolean

Test if the object collide with another object o.

Link copied to clipboard
abstract fun font(): Font

The font used for paint information.

Link copied to clipboard
abstract fun paint(g: Graphics2D)

Render the object.

Link copied to clipboard
abstract fun shouldAction(): Boolean

Should the UI logic be calculated.

Link copied to clipboard
abstract fun shouldRender(): Boolean

Should the UI logic be rendered.

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

Check the state of the object, and if this need to be removed, true should be returned.

Link copied to clipboard
abstract fun updateInfo()

How the GameLoop update the information of the UIObject.