MenuItem

abstract class MenuItem(val x: Int, val y: Int, val menu: Menu) : UIObject

The menu item controls the content of the menu, and it is structured as a dynamic tree, which nodes count is dynamic and nodes can be null to specified special logic.

The content of the menu should be the Menu.curLevel.

Author

KKoishi_

Inheritors

Constructors

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

Properties

Link copied to clipboard

The children menu item.

Link copied to clipboard

The textures of the children items.

Link copied to clipboard
val menu: Menu
Link copied to clipboard
Link copied to clipboard
var select: Int
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
open override fun font(): Font

The font used for paint information.

Link copied to clipboard
abstract operator fun invoke()

Determines what to happen when the selected is confirmed.

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

Render the object.

Link copied to clipboard
override fun shouldAction(): Boolean

Should the UI logic be calculated.

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

Should the UI logic be rendered.

Link copied to clipboard
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.