MetaComponent

class MetaComponent(val beforeClose: Supplier<CloseEventListener.CloseAction>? = null, val afterClose: Runnable? = null, val requestClose: GetSetter<Runnable>? = null) : GuiComponent, CloseEventListener(source)

Component providing XML wrappers and such the ability to wrap meta operations that operate on the entire screen. This component should be permanently mounted and does not impact layouting or rendering.

Constructors

Link copied to clipboard
constructor(beforeClose: Supplier<CloseEventListener.CloseAction>? = null, afterClose: Runnable? = null, requestClose: GetSetter<Runnable>? = null)

Properties

Link copied to clipboard
Link copied to clipboard
open override val height: Int
Link copied to clipboard
Link copied to clipboard
open override val width: Int

Functions

Link copied to clipboard
open override fun getHeight(): Int

Get the requested y size for this element. This is opposed to the actual size given in the context. Giving this element less space than this may result in misaligned or overlapping rendering.

Link copied to clipboard
open override fun getWidth(): Int

Get the requested x size for this element. This is opposed to the actual size given in the context. Giving this element less space than this may result in misaligned or overlapping rendering.

Link copied to clipboard
open override fun onAfterClose()

Called after the gui has been closed, both by the component gui, or by other actors, such as a teleport packet.

Link copied to clipboard

Called just before a voluntary close. Return CloseAction.DENY_CLOSE to override the close. Make sure to update your state such that the user can close the gui afterward.

Link copied to clipboard
open override fun render(context: GuiImmediateContext)

Called by the parent renderer. The GL matrix stack is pre-transformed, so rendering can begin at (0, 0) and should not render beyond what the context says is available.

Link copied to clipboard
open override fun setContext(context: GuiContext?)